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());
this.GetScrollPos=this.getScrollPos;
this.SetScrollPos=this.setScrollPos;
this.Resize=this.resize;
this.Print=this.print;
this.Collapse=this.collapse;
this.Expand=this.expand;
this.IsExternalContent=this.isExternalContent;
this.GetInnerWidth=this.getInnerWidth;
this.GetInnerHeight=this.getInnerHeight;
this.IsSplitterContainer=this.isSplitterContainer;
this.GetContentElement=this.getContentElement;
this.GetExtContentElement=this.getExtContentElement;
this.IsLocked=this.isLocked;
this.Lock=this.lock;
this.UnLock=this.unlock;
};
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,_19=_12.length;i<_19;i++){
_17+="<link href = '"+_12[i]+"' rel='stylesheet' type='text/css'></link>";
}
_17+="</head>";
}
var _1a=_17+"<body>"+this.get_content()+"</body>";
_15.document.open();
_15.document.write(_1a);
_15.document.close();
_15.print();
},collapse:function(_1b){
if(this.get_collapsed()){
return true;
}
if(!_1b){
_1b=Telerik.Web.UI.SplitterDirection.Forward;
}
var _1c=this._getTargetSplitBar(_1b);
var _1d=false;
if(_1c!=null){
var _1e=Telerik.Web.UI.SplitterDirection.Forward;
if(_1c._index<this._index){
_1e=Telerik.Web.UI.SplitterDirection.Backward;
}
_1d=_1c._collapseTargetPane(_1e);
}else{
_1d=this.get_splitter()._collapsePane(this,_1b);
}
return _1d;
},expand:function(_1f){
if(!this.get_collapsed()){
return true;
}
if(!_1f){
_1f=Telerik.Web.UI.SplitterDirection.Forward;
}
var _20=this._getTargetSplitBar(_1f);
var _21=false;
if(_20!=null){
var _22=Telerik.Web.UI.SplitterDirection.Forward;
if(_20._index<this._index){
_22=Telerik.Web.UI.SplitterDirection.Backward;
}
_21=_20._collapseTargetPane(_22);
}else{
_21=this.get_splitter()._expandPane(this,_1f);
}
return _21;
},isExternalContent:function(){
return (this._contentUrl!=null&&this._contentUrl!="");
},getInnerWidth:function(_23){
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(_24){
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.getVarSize());
},_isInitialFixedSize:function(){
return this._isFixedUnit(this._getOrigVarSize());
},_isFreeSize:function(){
return (this.getVarSize()=="");
},_isInitialFreeSize:function(){
return (this._getOrigVarSize()=="");
},_isPercentSize:function(){
return (this.getVarSize().toString().indexOf("%")>-1);
},_isInitialPercentSize:function(){
return (this._getOrigVarSize().toString().indexOf("%")>-1);
},_isFixedUnit:function(_25){
return !(!_25||_25.toString().indexOf("%")>-1);
},_getWidthAvailDecreaseDelta:function(){
if((this.get_collapsed()&&this._expandedSize>0)||this.isLocked()){
return 0;
}
var _26=this.get_width()-this.get_minWidth();
return _26;
},_getWidthAvailIncreaseDelta:function(){
if((this.get_collapsed()&&this._expandedSize>0)||this.isLocked()){
return 0;
}
var _27=this.get_maxWidth()-this.get_width();
return _27;
},_getHeightAvailDecreaseDelta:function(){
if((this.get_collapsed()&&this._expandedSize>0)||this.isLocked()){
return 0;
}
return this.get_height()-this.get_minHeight();
},_getHeightAvailIncreaseDelta:function(){
if((this.get_collapsed()&&this._expandedSize>0)||this.isLocked()){
return 0;
}
return this.get_maxHeight()-this.get_height();
},_setHeight:function(_28){
this._setSize(null,_28);
},_setWidth:function(_29){
this._setSize(_29);
},_setSize:function(_2a,_2b){
var _2c="";
var _2d=null;
if(_2a!=null){
if(_2b!=null){
this._setSize(null,_2b);
}
_2d=_2a;
_2c="_width";
setValueMethod="setOuterWidth";
getInnerValueMethod="getInnerWidth";
}else{
if(_2b!=null){
_2d=_2b;
_2c="_height";
setValueMethod="setOuterHeight";
getInnerValueMethod="getInnerHeight";
}
}
if(_2d==null){
return;
}
_2d=parseInt(_2d,10);
if(isNaN(_2d)||_2d==this[_2c]){
return;
}
_2d=Math.max(_2d,0);
this[_2c]=_2d;
if(this._contentElement!=null){
$telerik[setValueMethod](this._contentElement,this[getInnerValueMethod]());
if(this.isExternalContent()){
var _2e=this._extContentElement;
if(_2e){
$telerik[setValueMethod](_2e,this[getInnerValueMethod]());
}
}
}
$telerik[setValueMethod](this.get_element(),_2d);
this.updateClientState();
},_getOrigWidth:function(){
return this._originalWidth;
},_getOrigHeight:function(){
return this._originalHeight;
},_setOrigWidth:function(_2f){
this._originalWidth=_2f;
},_setOrigHeight:function(_30){
this._originalHeight=_30;
},_doInitialCollapse:function(){
this._initialCollapseMode=true;
this._collapsed=false;
var _31=this.get_splitter();
var _32=Telerik.Web.UI.SplitterDirection.Forward;
_32=this._collapsedDirection;
if(this._indexInPanes==_31.getPanes().length-1){
_32=Telerik.Web.UI.SplitterDirection.Backward;
}
this.collapse(_32);
this._initialCollapseMode=false;
},_doInitialExpand:function(){
this._initialExpandMode=true;
this._collapsed=true;
var _33=this.get_splitter();
var _34=Telerik.Web.UI.SplitterDirection.Forward;
if(this._indexInPanes==_33.getPanes().length-1){
_34=Telerik.Web.UI.SplitterDirection.Backward;
}
this.expand(_34);
this._initialExpandMode=false;
},_collapse:function(_35){
this._collapsedDirection=_35;
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 _36=this.get_splitter().getSplitBarByIndex(0);
if(_36!=null){
_36.get_element().style.borderTop="0px";
}
}
}
this._collapsed=true;
if(this.getVarSize()>0){
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(_37){
this._show();
this._collapsed=false;
this._expandedSize=0;
this.setVarSize(_37);
if(this.get_splitter().isVertical()){
this._setHeight(this.get_splitter().getInnerHeight());
}else{
this._setWidth(this.get_splitter().getInnerWidth());
}
$telerik.repaintChildren(this);
this.updateClientState();
},_getTargetSplitBar:function(_38,_39){
if(typeof (_39)=="undefined"){
_39=true;
}
if(!_38){
_38=Telerik.Web.UI.SplitterDirection.Forward;
}
var _3a=(_38==Telerik.Web.UI.SplitterDirection.Forward)?this._index+1:this._index-1;
var _3b=this.get_splitter()._getSplitBarByAbsIndex(_3a);
if(_3b!=null&&_3b.isCollapseDirectionEnabled(_38)){
return _3b;
}
if(_39){
_38=(_38==Telerik.Web.UI.SplitterDirection.Forward)?Telerik.Web.UI.SplitterDirection.Backward:Telerik.Web.UI.SplitterDirection.Forward;
return this._getTargetSplitBar(_38,false);
}
return null;
},_hideContent:function(){
this._contentElement.style.display="none";
if(this.isSplitterContainer()){
var _3c=this._childSplitter.getPanes();
for(var i=0,_3e=_3c.length;i<_3e;i++){
_3c[i]._hideContent();
}
}
},_showContent:function(){
this._contentElement.style.display="";
if(this.isSplitterContainer()){
var _3f=this._childSplitter.getPanes();
for(var i=0,_41=_3f.length;i<_41;i++){
_3f[i]._showContent();
}
}
},_setExternalContent:function(url){
if(!this._extContentElement){
var _43=(this._scrollingEnabled)?"auto":"no";
var _44=(!document.all)?"-3px;":null;
var _45=($telerik.isIE)?document.createElement("<iframe name='"+this.get_id()+"'>"):document.createElement("iframe");
_45.name=this.get_id();
_45.id="RAD_SPLITTER_PANE_EXT_CONTENT_"+this.get_id();
_45.src=url;
_45.style.border="0px";
_45.frameBorder="0";
_45.setAttribute("scrolling",_43);
if(_44){
_45.marginBottom=_44;
}
this._contentElement.innerHTML="";
this._contentElement.appendChild(_45);
this._extContentElement=_45;
var _46=this.getInnerWidth();
var _47=this.getInnerHeight();
if(this._isFixedUnit(_46)){
$telerik.setOuterWidth(this._extContentElement,_46);
}
if(this._isFixedUnit(_47)){
$telerik.setOuterHeight(this._extContentElement,_47);
}
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(_48){
var _49=(_48)?this._maxWidth:this._maxHeight;
var _4a=0;
if(this.isSplitterContainer()){
var _4b=false;
if(_48&&!this._childSplitter.isVertical()||!_48&&this._childSplitter.isVertical()){
_4b=true;
}
if(!_4b){
_4a=(_48)?this._childSplitter.getMaxWidth():this._childSplitter.getMaxHeight();
if(_4a!=null){
if(_49!=null){
_49=Math.min(_49,_4a);
}else{
_49=_4a;
}
}
}
}
return _49;
},_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();
}else{
if(this._expandedSize>0){
this._doInitialExpand();
}
}
this.updateClientState();
this._initializedInternal=true;
this.get_splitter().remove_loaded(this._splitterLoadedHandler);
},_onScroll:function(){
this.updateClientState();
},saveClientState:function(){
if(this.get_isUpdating()){
return null;
}
var _4c=this.getScrollPos();
var _4d={"_originalWidth":this._originalWidth,"_originalHeight":this._originalHeight,"_collapsedDirection":this._collapsedDirection,"_scrollLeft":_4c.left,"_scrollTop":_4c.top,"_expandedSize":this._expandedSize};
var _4e=["width","height","collapsed","contentUrl","minWidth","maxWidth","minHeight","maxHeight","locked"];
for(var i=0,_50=_4e.length;i<_50;i++){
var _51=_4e[i];
_4d[_51]=this["get_"+_51]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_4d);
}};
Telerik.Web.UI.RadPane.registerClass("Telerik.Web.UI.RadPane",Telerik.Web.UI.SplitterPaneBase);

