Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadPane=function(_1){
Telerik.Web.UI.RadPane.initializeBase(this,[_1]);
this._originalWidth=null;
this._originalHeight=null;
this._indexInPaneItems=null;
this._persistScrollPosition=true;
this._scrollLeft=0;
this._scrollTop=0;
this._collapsedDirection=null;
this._expandedSize=0;
this._indexInPanes=0;
this._locked=false;
this._onScrollAttached=false;
this._contentUrl="";
this._scrollingEnabled=true;
this._collapsedDirection=Telerik.Web.UI.SplitterDirection.Forward;
this._contentElement=$get("RAD_SPLITTER_PANE_CONTENT_"+this.get_id());
};
Telerik.Web.UI.RadPane.prototype={initialize:function(){
Telerik.Web.UI.RadPane.callBaseMethod(this,"initialize");
if(this.get_splitter().isVertical()){
this._getOrigVarSize=this._getOrigWidth;
this._setOrigVarSize=this._setOrigWidth;
this._getAvailIncreaseDelta=this._getWidthAvailIncreaseDelta;
this._getAvailDecreaseDelta=this._getWidthAvailDecreaseDelta;
}else{
this._getOrigVarSize=this._getOrigHeight;
this._setOrigVarSize=this._setOrigHeight;
this._getAvailIncreaseDelta=this._getHeightAvailIncreaseDelta;
this._getAvailDecreaseDelta=this._getHeightAvailDecreaseDelta;
}
this._splitterLoadedHandler=Function.createDelegate(this,this._splitterLoadedHandler);
this.get_splitter().add_loaded(this._splitterLoadedHandler);
},dispose:function(){
if(this._onScrollAttached){
}
Telerik.Web.UI.RadPane.callBaseMethod(this,"dispose");
},set_content:function(_2){
if(this.isExternalContent()){
this._contentElement.style.overflow=this._contentOverflow.overflow;
this._contentElement.style.overflowX=this._contentOverflow.overflowX;
this._contentElement.style.overflowY=this._contentOverflow.overflowY;
this._contentUrl=null;
this.updateClientState();
}
this._contentElement.innerHTML=_2;
},get_content:function(){
if(this.isExternalContent()){
return "";
}
return this._contentElement.innerHTML;
},set_contentUrl:function(_3){
this._contentUrl=_3;
if(this._initializedInternal){
this._setExternalContent(_3);
}
this.updateClientState();
},get_contentUrl:function(){
if(!this.isExternalContent()){
return "";
}
return this._contentUrl;
},get_minWidth:function(){
var _4=this._minWidth;
var _5=0;
if(this.isSplitterContainer()&&this._childSplitter.isVertical()){
_5=this._childSplitter.getMinWidth();
}
return Math.max(_4,_5);
},get_minHeight:function(){
var _6=this._minHeight;
var _7=0;
if(this.isSplitterContainer()&&!this._childSplitter.isVertical()){
_7=this._childSplitter.getMinHeight();
}
return Math.max(_6,_7);
},get_maxWidth:function(){
var _8=this._getMaxSize(true);
return _8;
},get_maxHeight:function(){
var _9=this._getMaxSize(false);
return _9;
},set_width:function(_a){
if(_a<0||_a==this._width){
return;
}
this._setWidth(_a);
if(this.isSplitterContainer()){
this._childSplitter.set_width(this.getInnerWidth());
}
},set_height:function(_b){
if(_b<0||_b==this._height){
return;
}
this._setHeight(_b);
if(this.isSplitterContainer()){
this._childSplitter.set_height(this.getInnerHeight());
}
},get_locked:function(){
return this._locked;
},set_locked:function(_c){
this._locked=_c;
},get_persistScrollPosition:function(){
return this._persistScrollPosition;
},set_persistScrollPosition:function(_d){
this._persistScrollPosition=_d;
},getScrollPos:function(){
return {left:this._contentElement.scrollLeft,top:this._contentElement.scrollTop};
},setScrollPos:function(_e,_f){
this._contentElement.scrollLeft=_e;
this._contentElement.scrollTop=_f;
},resize:function(_10,_11){
this.get_splitter()._resizePanes(_10,this,_11);
},print:function(_12){
var _13="width="+this.get_width()+"px, height="+this.get_height()+"px, scrollbars=1";
var _14=(this.isExternalContent())?this.get_contentUrl():"about:blank";
var _15=window.open(_14,"",_13,false);
if(this.isExternalContent()){
try{
var t=function(){
_15.print();
};
setTimeout(t,1000);
}
catch(e){
}
return;
}
var _17="";
if(_12){
_17="<head>";
for(var i=0;i<_12.length;i++){
_17+="<link href = '"+_12[i]+"' rel='stylesheet' type='text/css'></link>";
}
_17+="</head>";
}
var _19=_17+"<body>"+this.get_content()+"</body>";
_15.document.open();
_15.document.write(_19);
_15.document.close();
_15.print();
},collapse:function(_1a){
if(this.get_collapsed()){
return true;
}
if(!_1a){
_1a=Telerik.Web.UI.SplitterDirection.Forward;
}
var _1b=this._getTargetSplitBar(_1a);
var _1c=false;
if(_1b!=null){
var _1d=Telerik.Web.UI.SplitterDirection.Forward;
if(_1b._index<this._index){
_1d=Telerik.Web.UI.SplitterDirection.Backward;
}
_1c=_1b._collapseTargetPane(_1d);
}else{
_1c=this.get_splitter()._collapsePane(this,_1a);
}
return _1c;
},expand:function(_1e){
if(!this.get_collapsed()){
return true;
}
if(!_1e){
_1e=Telerik.Web.UI.SplitterDirection.Forward;
}
var _1f=this._getTargetSplitBar(_1e);
var _20=false;
if(_1f!=null){
var _21=Telerik.Web.UI.SplitterDirection.Forward;
if(_1f._index<this._index){
_21=Telerik.Web.UI.SplitterDirection.Backward;
}
_20=_1f._collapseTargetPane(_21);
}else{
_20=this.get_splitter()._expandPane(this,_1e);
}
return _20;
},isExternalContent:function(){
return (this._contentUrl!=null&&this._contentUrl!="");
},getInnerWidth:function(_22){
return parseInt(this._width);
if(this.isSplitterContainer()){
return this._width;
}
if(this._width>2*this.get_splitter().panesBorderSize){
return this._width-2*this.get_splitter().panesBorderSize;
}
return 0;
},getInnerHeight:function(_23){
return parseInt(this._height);
if(this.isSplitterContainer()){
return this._height;
}
if(this._height>2*this.get_splitter().panesBorderSize){
return this._height-2*this.get_splitter().panesBorderSize;
}
return 0;
},isSplitterContainer:function(){
return (this._childSplitter!=null);
},getContentElement:function(){
return this._contentElement;
},getExtContentElement:function(){
return this._extContentElement;
},isLocked:function(){
return this._locked;
},lock:function(){
this.set_locked(true);
this.updateClientState();
},unlock:function(){
this.set_locked(false);
},_isFixedSize:function(){
return this._isFixedUnit(this._getOrigVarSize());
},_isFreeSize:function(){
var _24=this.getVarSize();
if(_24==""){
return true;
}
return false;
},_isInitialFreeSize:function(){
var _25=this._getOrigVarSize();
if(_25==""){
return true;
}
return false;
},_isPercentSize:function(){
var _26=this.getVarSize();
if(_26.toString().indexOf("%")>-1){
return true;
}
return false;
},_isFixedUnit:function(_27){
if(!_27||_27.toString().indexOf("%")>-1){
return false;
}
return true;
},_getWidthAvailDecreaseDelta:function(){
if(this.get_collapsed()||this.isLocked()){
return 0;
}
var _28=this.get_width()-this.get_minWidth();
return _28;
},_getWidthAvailIncreaseDelta:function(){
if(this.get_collapsed()||this.isLocked()){
return 0;
}
var _29=this.get_maxWidth()-this.get_width();
return _29;
},_getHeightAvailDecreaseDelta:function(){
if(this.get_collapsed()||this.isLocked()){
return 0;
}
return this.get_height()-this.get_minHeight();
},_getHeightAvailIncreaseDelta:function(){
if(this.get_collapsed()||this.isLocked()){
return 0;
}
return this.get_maxHeight()-this.get_height();
},_setHeight:function(_2a){
this._setSize(null,_2a);
},_setWidth:function(_2b){
this._setSize(_2b);
},_setSize:function(_2c,_2d){
var _2e="";
var _2f=null;
if(_2c!=null){
if(_2d!=null){
this._setSize(null,_2d);
}
_2f=_2c;
_2e="_width";
setValueMethod="setOuterWidth";
getInnerValueMethod="getInnerWidth";
}else{
if(_2d!=null){
_2f=_2d;
_2e="_height";
setValueMethod="setOuterHeight";
getInnerValueMethod="getInnerHeight";
}
}
if(_2f==null){
return;
}
_2f=parseInt(_2f,10);
if(isNaN(_2f)||_2f==this[_2e]){
return;
}
_2f=Math.max(_2f,0);
this[_2e]=_2f;
if(this._contentElement!=null){
$telerik[setValueMethod](this._contentElement,this[getInnerValueMethod]());
if(this.isExternalContent()){
var _30=this._extContentElement;
if(_30){
$telerik[setValueMethod](_30,this[getInnerValueMethod]());
}
}
}
$telerik[setValueMethod](this.get_element(),_2f);
this.updateClientState();
},_getOrigWidth:function(){
return this._originalWidth;
},_getOrigHeight:function(){
return this._originalHeight;
},_setOrigWidth:function(_31){
this._originalWidth=_31;
},_setOrigHeight:function(_32){
this._originalHeight=_32;
},_doInitialCollapse:function(){
this._initialCollapseMode=true;
this._collapsed=false;
var _33=Telerik.Web.UI.SplitterDirection.Forward;
_33=this._collapsedDirection;
var _34=this._getTargetSplitBar(_33);
if(_34!=null){
var _35=Telerik.Web.UI.SplitterDirection.Forward;
if(_34._index<this._index){
_35=Telerik.Web.UI.SplitterDirection.Backward;
}
_34._collapseTargetPane(_35);
}else{
this.get_splitter()._collapsePane(this,Telerik.Web.UI.SplitterDirection.Forward);
}
this._initialCollapseMode=false;
},_collapse:function(_36){
this._collapsedDirection=_36;
this._contentElement.style.display="none";
if(this.get_splitter().isVertical()){
this.get_element().style.display="none";
}else{
$get("RAD_SPLITTER_PANE_TR_"+this.get_id()).style.display="none";
if(document.all&&this._indexInPanes==0){
var _37=this.get_splitter().getSplitBarByIndex(0);
if(_37!=null){
_37.get_element().style.borderTop="0px";
}
}
}
this._collapsed=true;
if(this.getVarSize()>0&&(!this._initialCollapseMode||!this._expandedSize)){
this._expandedSize=this.getVarSize();
}
if(this.get_splitter().isVertical()){
this._width=0;
}else{
this._height=0;
}
this.updateClientState();
},_show:function(){
this._contentElement.style.display="";
if(this.get_splitter().isVertical()){
this.get_element().style.display="";
}else{
$get("RAD_SPLITTER_PANE_TR_"+this.get_id()).style.display="";
}
},_expand:function(_38){
this._show();
this._collapsed=false;
this.setVarSize(_38);
if(this.get_splitter().isVertical()){
this._setHeight(this.get_splitter().getInnerHeight());
}else{
this._setWidth(this.get_splitter().getInnerWidth());
}
this._callRadShow();
this.updateClientState();
},_getTargetSplitBar:function(_39,_3a){
if(typeof (_3a)=="undefined"){
_3a=true;
}
if(!_39){
_39=Telerik.Web.UI.SplitterDirection.Forward;
}
var _3b=(_39==Telerik.Web.UI.SplitterDirection.Forward)?this._index+1:this._index-1;
var _3c=this.get_splitter()._getSplitBarByAbsIndex(_3b);
if(_3c!=null&&_3c.isCollapseDirectionEnabled(_39)){
return _3c;
}
if(_3a){
_39=(_39==Telerik.Web.UI.SplitterDirection.Forward)?Telerik.Web.UI.SplitterDirection.Backward:Telerik.Web.UI.SplitterDirection.Forward;
return this._getTargetSplitBar(_39,false);
}
return null;
},_hideContent:function(){
this._contentElement.style.display="none";
if(this.isSplitterContainer()){
var _3d=this._childSplitter.getPanes();
for(var i=0;i<_3d.length;i++){
_3d[i]._hideContent();
}
}
},_showContent:function(){
this._contentElement.style.display="";
if(this.isSplitterContainer()){
var _3f=this._childSplitter.getPanes();
for(var i=0;i<_3f.length;i++){
_3f[i]._showContent();
}
}
},_callRadResize:function(){
Telerik.Web.UI.CallRadResize(this.get_element());
},_callRadShow:function(){
Telerik.Web.UI.CallRadShow(this.get_element());
},_setExternalContent:function(url){
if(!this._extContentElement){
var _42=(this._scrollingEnabled)?"auto":"no";
var _43=(!document.all)?"-3px;":null;
var _44=($telerik.isIE)?document.createElement("<iframe name='"+this.get_id()+"'>"):document.createElement("iframe");
_44.name=this.get_id();
_44.id="RAD_SPLITTER_PANE_EXT_CONTENT_"+this.get_id();
_44.src=url;
_44.style.border="0px";
_44.frameBorder="0";
_44.setAttribute("scrolling",_42);
if(_43){
_44.marginBottom=_43;
}
this._contentElement.innerHTML="";
this._contentElement.appendChild(_44);
this._extContentElement=_44;
var _45=this.getInnerWidth();
var _46=this.getInnerHeight();
if(this._isFixedUnit(_45)){
$telerik.setOuterWidth(this._extContentElement,_45);
}
if(this._isFixedUnit(_46)){
$telerik.setOuterHeight(this._extContentElement,_46);
}
this._contentOverflow={overflow:this._contentElement.style.overflow,overflowX:this._contentElement.style.overflowX,overflowY:this._contentElement.style.overflowY};
this._contentElement.style.overflow="hidden";
this._contentElement.style.overflowX="hidden";
this._contentElement.style.overflowY="hidden";
}else{
this._extContentElement.src=url;
}
},_getMaxSize:function(_47){
var _48=(_47)?this._maxWidth:this._maxHeight;
var _49=0;
if(this.isSplitterContainer()){
var _4a=false;
if(_47&&!this._childSplitter.isVertical()||!_47&&this._childSplitter.isVertical()){
_4a=true;
}
if(!_4a){
_49=(_47)?this._childSplitter.getMaxWidth():this._childSplitter.getMaxHeight();
if(_49!=null){
if(_48!=null){
_48=Math.min(_48,_49);
}else{
_48=_49;
}
}
}
}
return _48;
},_splitterLoadedHandler:function(){
if(this.isExternalContent()){
this._setExternalContent(this._contentUrl);
}else{
if(this._scrollingEnabled&&this._persistScrollPosition){
$addHandlers(this._contentElement,{"scroll":this._onScroll},this);
this._onScrollAttached=true;
this.setScrollPos(this._scrollLeft,this._scrollTop);
}
}
if(this._collapsed){
this._doInitialCollapse();
}
this.updateClientState();
this._initializedInternal=true;
this.get_splitter().remove_loaded(this._splitterLoadedHandler);
},_onScroll:function(){
this.updateClientState();
},saveClientState:function(){
if(this.get_isUpdating()){
return;
}
var _4b=this.getScrollPos();
var _4c={"_originalWidth":this._originalWidth,"_originalHeight":this._originalHeight,"_collapsedDirection":this._collapsedDirection,"_scrollLeft":_4b.left,"_scrollTop":_4b.top,"_expandedSize":this._expandedSize};
var _4d=["width","height","collapsed","contentUrl","minWidth","maxWidth","minHeight","maxHeight","locked"];
for(var i=0;i<_4d.length;i++){
_4c[_4d[i]]=this["get_"+_4d[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_4c);
}};
$telerik.makeCompatible(Telerik.Web.UI.RadPane);
Telerik.Web.UI.RadPane.registerClass("Telerik.Web.UI.RadPane",Telerik.Web.UI.SplitterPaneBase);

