﻿Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.DockMode=function(){
throw Error.notImplemented();
};
Telerik.Web.UI.DockMode.prototype={Floating:1,Docked:2,Default:3};
Telerik.Web.UI.DockMode.registerEnum("Telerik.Web.UI.DockMode");
Telerik.Web.UI.DockHandle=function(){
throw Error.notImplemented();
};
Telerik.Web.UI.DockHandle.prototype={None:0,TitleBar:1,Grip:2,Auto:3};
Telerik.Web.UI.DockHandle.registerEnum("Telerik.Web.UI.DockHandle");
Telerik.Web.UI.RadDock=function(_1){
Telerik.Web.UI.RadDock.initializeBase(this,[_1]);
this._enableDrag=true;
this._top=0;
this._left=0;
this._autoPostBack=false;
this._dockZoneID=null;
this._title=null;
this._commands=null;
this._closed=false;
this._collapsed=false;
this._pinned=false;
this._index=0;
this._forbiddenZones=[];
this._layoutID=null;
this._handle=null;
this._dockMode=Telerik.Web.UI.DockMode.Default;
this._dockHandle=Telerik.Web.UI.DockHandle.TitleBar;
this._width="300px";
this._height=null;
this._uniqueID=null;
this._uniqueName=null;
};
Telerik.Web.UI.RadDock.DragDataType="RadDock";
Telerik.Web.UI.RadDock.prototype={getCommandElement:function(_2){
var _3=$get(this.get_TitlebarContainerID());
if(_3){
var _4=this._getCommandsContainer(_3);
var _5=_4.getElementsByTagName("a");
for(var i=0;i<_5.length;i++){
var _7=_5[i].control;
if(_7&&_7.get_Name()==_2){
return _5[i];
}
}
}
return null;
},getCommand:function(_8){
var _9=this.getCommandElement(_8);
if(_9){
return _9.control;
}
return null;
},_setDockedCommandsVisibility:function(){
var _a=(this.get_DockZoneID()!="");
var _b=this.getCommandElement("PinUnpin");
if(_b){
_b.style.display=_a?"none":"inline";
}
},_resetPosition:function(){
var _c=this.get_element();
_c.style.top="";
_c.style.left="";
_c.originalPosition="relative";
_c.style.position="relative";
_c.style.zIndex=this.originalZIndex;
},undock:function(){
var _d=$find(this.get_DockZoneID());
this._form.appendChild(this.get_element());
var _e=this._getLocation();
this.set_Left(_e.x);
this.set_Top(_e.y);
if(_d){
this.set_DockZoneID("");
_d._resetDockIndices();
this.get_element().style.width=this.get_Width();
}
this._setDockedCommandsVisibility();
this._setCommandsContainerWidth();
this.updateClientState();
},_getBounds:function(_f){
return Telerik.Web.DomElement.getBounds(_f);
},_startDragDrop:function(_10){
this.originalZIndex=_10.style.zIndex;
var _11=this._getBounds(_10);
var _12=Telerik.Web.CommonScripts.getBorderBox(_10);
_11.width-=_12.horizontal;
_11.height-=_12.vertical;
_10.style.width=_11.width+"px";
_10.style.zIndex="9999999";
var _13=$telerikCommon.getLocationWithScrollOffset(_10);
this._form.appendChild(_10);
var _14=$find(this.get_DockZoneID());
if(_14){
_14._showPlaceholder(_10);
}
this._setLocation(_10,_13);
Telerik.Web.DragDropManager.startDragDrop(this,_10,null);
},_mouseDownHandler:function(e){
window._event=e;
var _16=(0>Array.indexOf(["input","button","select","textarea","label","a"],e.target.tagName.toLowerCase()));
if(_16){
e.preventDefault();
this._startDragDrop(this.get_element());
}
},initialize:function(){
Telerik.Web.UI.RadDock.callBaseMethod(this,"initialize");
var _17=this.get_element().parentNode;
while(_17!=null){
if(_17.tagName.toLowerCase()==="form"){
this._form=_17;
break;
}
_17=_17.parentNode;
}
var _18=this;
this.get_element().RadShow=function(){
var t=function(){
if(_18.get_Closed()){
return;
}
_18._setContentContainerHeight(true);
_18._setCommandsContainerWidth();
};
window.setTimeout(t,10);
};
this.set_EnableDrag(this.get_EnableDrag()&&!this.get_Pinned());
this._setContentContainerHeight();
this.raise_Initialize(new Sys.EventArgs());
},_setContentContainerHeight:function(){
var _1a=$get(this.get_ContentContainerID());
if(_1a){
if(!Telerik.Web.DomElement.containsCssClass(this.get_element(),"rdVariableHeight")){
var _1b=this._getBounds(this.get_element());
var _1c=this.get_handle()?this._getBounds(this.get_handle()):{width:0,height:0};
var _1d=this.get_handle()?Telerik.Web.CommonScripts.getBorderBox(this.get_handle()):{vertical:0,horizontal:0};
var _1e=_1b.height-_1c.height-_1d.vertical-2;
_1a.style.height=(_1e<0?0:_1e)+"px";
}
}
},_initializeCommands:function(_1f){
if(this._commandsInitialized){
return;
}
this._commandsInitialized=true;
var _20=this._getCommandsContainer(_1f);
var _21=_20.getElementsByTagName("a");
var _22=this.get_Commands();
if(_22){
for(var i=0;i<_22.length;i++){
var _24=eval(_22[i].ClientTypeName);
if(_22[i].ClientTypeName=="Telerik.Web.UI.DockCommand"||_24.inheritsFrom(Telerik.Web.UI.DockCommand)){
_22[i].RadDock=this;
var _25=null;
if(_22[i].Command){
_25={"Command":eval(_22[i].Command)};
delete _22[i].Command;
}
$create(_24,_22[i],_25,null,_21[i]);
}else{
throw Error.invalidOperation(_22[i].ClientTypeName+" does not inherit from Telerik.Web.UI.DockCommand.");
}
}
}
this._setDockedCommandsVisibility();
this._setCommandsContainerWidth(_1f);
},_setCommandsContainerWidth:function(_26){
if(!_26){
_26=$get(this.get_TitlebarContainerID());
if(!_26){
return;
}
}
var _27=this._getCommandsContainer(_26);
var _28=_27.getElementsByTagName("a");
var _29=0;
for(var i=0;i<_28.length;i++){
var _2b=Telerik.Web.CommonScripts.getMarginBox(_28[i]);
var _2c=Telerik.Web.CommonScripts.getBorderBox(_28[i]);
var _2d=this._getBounds(_28[i]);
_29+=_2d.width+_2b.horizontal+_2c.horizontal;
}
_27.style.width=_29+"px";
},_getCommandsContainer:function(_2e){
var _2f=_2e.firstChild;
while(_2f!=null){
if(_2f.className=="rdCommands"){
return _2f;
}
_2f=_2f.nextSibling;
}
return null;
},dispose:function(){
var _30=this.get_element();
if(_30!=null){
_30.RadShow=null;
}
this.set_handle(null);
Telerik.Web.UI.RadDock.callBaseMethod(this,"dispose");
},saveClientState:function(){
var _31={Top:this.get_Top(),Left:this.get_Left(),DockZoneID:this.get_DockZoneID(),Collapsed:this.get_Collapsed(),Pinned:this.get_Pinned(),Closed:this.get_Closed(),Index:this.get_Index()};
return Sys.Serialization.JavaScriptSerializer.serialize(_31);
},conditionalPostback:function(_32){
if(this.get_AutoPostBack()){
this.doPostBack(_32);
}
},doPostBack:function(_33){
__doPostBack(this.get_UniqueID(),_33);
},get_dragDataType:function(){
return Telerik.Web.UI.RadDock.DragDataType;
},getDragData:function(_34){
return this;
},get_dragMode:function(){
return Telerik.Web.DragMode.Move;
},onDragStart:function(){
this.raise_DragStart(new Sys.EventArgs());
},onDrag:function(){
this.raise_Drag(new Sys.EventArgs());
},onDragEnd:function(_35){
this.raise_DragEnd(new Sys.EventArgs());
if(_35){
this._restorePosition();
}
},_restorePosition:function(){
var _36=$find(this.get_DockZoneID());
if(_36){
_36.dock(this,this.get_Index());
}else{
this.undock();
}
},add_Command:function(_37){
this.get_events().addHandler("Command",_37);
},remove_Command:function(_38){
this.get_events().removeHandler("Command",_38);
},raise_Command:function(_39){
this.raiseEvent("Command",_39);
},add_DragStart:function(_3a){
this.get_events().addHandler("DragStart",_3a);
},remove_DragStart:function(_3b){
this.get_events().removeHandler("DragStart",_3b);
},raise_DragStart:function(_3c){
this.raiseEvent("DragStart",_3c);
},add_Drag:function(_3d){
this.get_events().addHandler("Drag",_3d);
},remove_Drag:function(_3e){
this.get_events().removeHandler("Drag",_3e);
},raise_Drag:function(_3f){
this.raiseEvent("Drag",_3f);
},add_DragEnd:function(_40){
this.get_events().addHandler("DragEnd",_40);
},remove_DragEnd:function(_41){
this.get_events().removeHandler("DragEnd",_41);
},raise_DragEnd:function(_42){
this.raiseEvent("DragEnd",_42);
},add_DockPositionChanged:function(_43){
this.get_events().addHandler("DockPositionChanged",_43);
},remove_DockPositionChanged:function(_44){
this.get_events().removeHandler("DockPositionChanged",_44);
},raise_DockPositionChanged:function(_45){
this.raiseEvent("DockPositionChanged",_45);
this.conditionalPostback("DockPositionChanged");
},add_DockPositionChanging:function(_46){
this.get_events().addHandler("DockPositionChanging",_46);
},remove_DockPositionChanging:function(_47){
this.get_events().removeHandler("DockPositionChanging",_47);
},raise_DockPositionChanging:function(_48){
this.raiseEvent("DockPositionChanging",_48);
},add_Initialize:function(_49){
this.get_events().addHandler("Initialize",_49);
},remove_Initialize:function(_4a){
this.get_events().removeHandler("Initialize",_4a);
},raise_Initialize:function(_4b){
this.raiseEvent("Initialize",_4b);
},_getScrollOffset:function(_4c,_4d){
var _4e=_4c.scrollLeft;
var top=_4c.scrollTop;
if(_4d){
var _50=_4c.parentNode;
while(_50!=null&&_50.scrollLeft!=null){
_4e+=_50.scrollLeft;
top+=_50.scrollTop;
if(_50==document.body&&(_4e!=0&&top!=0)){
break;
}
_50=_50.parentNode;
}
}
return {x:_4e,y:top};
},get_Top:function(){
return this._top;
},set_Top:function(_51){
this._top=_51;
},get_Left:function(){
return this._left;
},set_Left:function(_52){
this._left=_52;
},get_Closed:function(){
return this._closed;
},set_Closed:function(_53){
this._closed=_53;
this.get_element().style.display=this._closed?"none":"block";
if(!this._closed){
this._setCommandsContainerWidth();
this._setContentContainerHeight();
Telerik.Web.UI.CallRadShow($get(this.get_ContentContainerID()));
Telerik.Web.UI.CallRadShow($get(this.get_TitlebarContainerID()));
}
},get_Collapsed:function(){
return this._collapsed;
},set_Collapsed:function(_54){
this._collapsed=_54;
this.get_element().style.height=_54?"auto":this.get_Height();
if(this._collapsed){
Telerik.Web.DomElement.addCssClass(this.get_element(),"rdCollapsed");
}else{
Telerik.Web.DomElement.removeCssClass(this.get_element(),"rdCollapsed");
}
this._setContentContainerHeight();
if(!this._collapsed){
Telerik.Web.UI.CallRadShow($get(this.get_ContentContainerID()));
}
var _55=this.getCommand("ExpandCollapse");
if(_55){
_55.set_State(_54?2:1);
}
},get_AutoPostBack:function(){
return this._autoPostBack;
},set_AutoPostBack:function(_56){
this._autoPostBack=_56;
},get_Commands:function(){
return this._commands;
},set_Commands:function(_57){
this._commands=_57;
},get_DockHandle:function(){
return this._dockHandle;
},set_DockHandle:function(_58){
this._dockHandle=_58;
},get_DockMode:function(){
return this._dockMode;
},set_DockMode:function(_59){
this._dockMode=_59;
},get_DockZoneID:function(){
return this._dockZoneID;
},set_DockZoneID:function(_5a){
this._dockZoneID=_5a;
},get_ForbiddenZones:function(){
return this._forbiddenZones;
},set_ForbiddenZones:function(_5b){
this._forbiddenZones=_5b;
},get_Height:function(){
return this._height;
},set_Height:function(_5c){
this._height=_5c;
},get_Index:function(){
return this._index;
},set_Index:function(_5d){
this._index=_5d;
},get_LayoutID:function(){
return this._layoutID;
},set_LayoutID:function(_5e){
this._layoutID=_5e;
},get_EnableDrag:function(){
return this._enableDrag;
},set_EnableDrag:function(_5f){
this._enableDrag=_5f;
var _60=$get(this.get_TitlebarContainerID());
if(!_60){
_60=$get(this.get_GripID());
}else{
this._initializeCommands(_60);
}
if(_5f&&_60){
this.set_handle(_60);
}else{
this.set_handle(null);
}
},_addPoints:function(p1,p2){
return {x:p1.x+p2.x,y:p1.y+p2.y};
},_subtractPoints:function(p1,p2){
return {x:p1.x-p2.x,y:p1.y-p2.y};
},get_Pinned:function(){
return this._pinned;
},set_Pinned:function(_65){
this._pinned=_65;
if(_65){
var _66=this._subtractPoints(this._getLocation(),this._getScrollOffset(this.get_element(),true));
this._setLocation(this.get_element(),_66);
this.get_element().style.position="fixed";
this.set_EnableDrag(false);
}else{
var _66=this._addPoints(this._getLocation(),this._getScrollOffset(this.get_element(),true));
this._setLocation(this.get_element(),_66);
this.set_EnableDrag(true);
}
var _67=this.getCommand("PinUnpin");
if(_67){
_67.set_State(_65?2:1);
}
},_getLocation:function(_68){
if(!_68){
_68=this.get_element();
}
return Telerik.Web.DomElement.getLocation(_68);
},_setLocation:function(_69,_6a){
Telerik.Web.DomElement.setLocation(_69,_6a);
},get_Title:function(){
return this._title;
},set_Title:function(_6b){
this._title=_6b;
},get_UniqueID:function(){
return this._uniqueID;
},set_UniqueID:function(_6c){
this._uniqueID=_6c;
},get_UniqueName:function(){
return this._uniqueName;
},set_UniqueName:function(_6d){
this._uniqueName=_6d;
},get_Width:function(){
return this._width;
},set_Width:function(_6e){
this._width=_6e;
},get_ContentContainerID:function(){
return this.get_element().id+"_C";
},get_TitlebarContainerID:function(){
return this.get_element().id+"_T";
},get_GripID:function(){
return this.get_element().id+"_G";
},get_handle:function(){
return this._handle;
},set_handle:function(_6f){
if(this._handle!=null){
$clearHandlers(this._handle);
}
this._handle=_6f;
if(this._handle!=null){
$addHandlers(this._handle,{"mousedown":this._mouseDownHandler},this);
}
}};
Telerik.Web.UI.RadDock.registerClass("Telerik.Web.UI.RadDock",Telerik.Web.UI.RadWebControl,Telerik.Web.IDragSource);
Telerik.Web.UI.CallRadResize=function(_70){
var _71=_70.getElementsByTagName("*");
for(var i=0;i<_71.length;i++){
var _73=_71[i];
if(_73.RadResize){
_73.RadResize();
}
}
};
Telerik.Web.UI.CallRadShow=function(_74){
var _75=_74.getElementsByTagName("*");
for(var i=0;i<_75.length;i++){
var _77=_75[i];
if(_77.RadShow){
_77.RadShow();
}
}
};
Telerik.Web.UI.DockCommand=function(_78){
Telerik.Web.UI.DockCommand.initializeBase(this,[_78]);
this._clientTypeName=null;
this._cssClass="rdCustom";
this._radDock=null;
this._name="Custom";
this._text="Custom";
this._autoPostBack=false;
};
Telerik.Web.UI.DockCommand.prototype={add_Command:function(_79){
this.get_events().addHandler("Command",_79);
},remove_Command:function(_7a){
this.get_events().removeHandler("Command",_7a);
},raise_Command:function(_7b){
var _7c=this.get_events().getHandler("Command");
if(_7c){
_7c(this,_7b);
}
},get_ClientTypeName:function(){
return this._clientTypeName;
},set_ClientTypeName:function(_7d){
this._clientTypeName=_7d;
},get_CssClass:function(){
return this._cssClass;
},set_CssClass:function(_7e){
this._cssClass=_7e;
},get_Name:function(){
return this._name;
},set_Name:function(_7f){
this._name=_7f;
},get_Text:function(){
return this._text;
},set_Text:function(_80){
this._text=_80;
},get_AutoPostBack:function(){
return this._autoPostBack;
},set_AutoPostBack:function(_81){
this._autoPostBack=_81;
},get_RadDock:function(){
return this._radDock;
},set_RadDock:function(_82){
this._radDock=_82;
},onCommand:function(e){
var _84=new Sys.CancelEventArgs();
_84.Command=this;
this.raise_Command(_84);
if(_84.get_cancel()){
return;
}
this.get_RadDock().raise_Command(_84);
if(_84.get_cancel()){
return;
}
this.get_RadDock().updateClientState();
this.conditionalPostback();
},conditionalPostback:function(){
if(this.get_AutoPostBack()){
this.get_RadDock().doPostBack(this.get_Name());
}
},initialize:function(){
Telerik.Web.UI.DockCommand.callBaseMethod(this,"initialize");
$addHandlers(this.get_element(),{"click":this.onCommand},this);
},dispose:function(){
$clearHandlers(this.get_element());
Telerik.Web.UI.DockCommand.callBaseMethod(this,"dispose");
}};
Telerik.Web.UI.DockCommand.registerClass("Telerik.Web.UI.DockCommand",Sys.UI.Control);
Telerik.Web.UI.DockToggleCommand=function(_85){
Telerik.Web.UI.DockToggleCommand.initializeBase(this,[_85]);
this._state=1;
this._alternateCssClass="rdCustom";
this._alternateText="Custom";
};
Telerik.Web.UI.DockToggleCommand.prototype={get_State:function(){
return this._state;
},set_State:function(_86){
this._state=_86;
var _87=this.get_element();
if(_86===1){
_87.title=this.get_Text();
Telerik.Web.DomElement.addCssClass(_87,this.get_CssClass());
Telerik.Web.DomElement.removeCssClass(_87,this.get_AlternateCssClass());
}else{
_87.title=this.get_AlternateText();
Telerik.Web.DomElement.addCssClass(_87,this.get_AlternateCssClass());
Telerik.Web.DomElement.removeCssClass(_87,this.get_CssClass());
}
},get_AlternateCssClass:function(){
return this._alternateCssClass;
},set_AlternateCssClass:function(_88){
this._alternateCssClass=_88;
},get_AlternateText:function(){
return this._alternateText;
},set_AlternateText:function(_89){
this._alternateText=_89;
},initialize:function(){
Telerik.Web.UI.DockToggleCommand.callBaseMethod(this,"initialize");
},dispose:function(){
Telerik.Web.UI.DockToggleCommand.callBaseMethod(this,"dispose");
}};
Telerik.Web.UI.DockToggleCommand.registerClass("Telerik.Web.UI.DockToggleCommand",Telerik.Web.UI.DockCommand);
Telerik.Web.UI.DockCloseCommand=function(_8a){
Telerik.Web.UI.DockCloseCommand.initializeBase(this,[_8a]);
this._cssClass="rdClose";
this._name="Close";
this._text="Close";
};
Telerik.Web.UI.DockCloseCommand.prototype={onCommand:function(e){
this.get_RadDock().set_Closed(true);
Telerik.Web.UI.DockCloseCommand.callBaseMethod(this,"onCommand");
}};
Telerik.Web.UI.DockCloseCommand.registerClass("Telerik.Web.UI.DockCloseCommand",Telerik.Web.UI.DockCommand);
Telerik.Web.UI.DockExpandCollapseCommand=function(_8c){
Telerik.Web.UI.DockExpandCollapseCommand.initializeBase(this,[_8c]);
this._cssClass="rdCollapse";
this._alternateCssClass="rdExpand";
this._name="ExpandCollapse";
this._text="Collapse";
this._alternateText="Expand";
};
Telerik.Web.UI.DockExpandCollapseCommand.prototype={onCommand:function(e){
this.get_RadDock().set_Collapsed(!this.get_RadDock().get_Collapsed());
Telerik.Web.UI.DockExpandCollapseCommand.callBaseMethod(this,"onCommand");
}};
Telerik.Web.UI.DockExpandCollapseCommand.registerClass("Telerik.Web.UI.DockExpandCollapseCommand",Telerik.Web.UI.DockToggleCommand);
Telerik.Web.UI.DockPinUnpinCommand=function(_8e){
Telerik.Web.UI.DockPinUnpinCommand.initializeBase(this,[_8e]);
this._cssClass="rdUnpin";
this._alternateCssClass="rdPin";
this._name="PinUnpin";
this._text="Pin";
this._alternateText="Unpin";
};
Telerik.Web.UI.DockPinUnpinCommand.prototype={onCommand:function(e){
this.get_RadDock().set_Pinned(!this.get_RadDock().get_Pinned());
Telerik.Web.UI.DockPinUnpinCommand.callBaseMethod(this,"onCommand");
}};
Telerik.Web.UI.DockPinUnpinCommand.registerClass("Telerik.Web.UI.DockPinUnpinCommand",Telerik.Web.UI.DockToggleCommand);
Telerik.Web.UI._documentDropZone=function(_90){
};
Telerik.Web.UI._documentDropZone.prototype={get_dropTargetElement:function(){
return (Telerik.Web.Browser.renderMode==Telerik.Web.Browser.StandardsMode)?document.body:document.documentElement;
},canDrop:function(_91,_92,_93){
return (_92===Telerik.Web.UI.RadDock.DragDataType&&(_93.get_DockMode()&Telerik.Web.UI.DockMode.Floating)>0);
},drop:function(_94,_95,_96){
var _97=new Sys.CancelEventArgs();
_96.raise_DockPositionChanging(_97);
if(_97.get_cancel()){
_96._restorePosition();
}else{
_96.undock();
_96.raise_DockPositionChanged(new Sys.EventArgs());
}
},onDragEnterTarget:function(_98,_99,_9a){
},onDragLeaveTarget:function(_9b,_9c,_9d){
},onDragInTarget:function(_9e,_9f,_a0){
}};
Telerik.Web.UI._documentDropZone.registerClass("Telerik.Web.UI._documentDropZone",null,Telerik.Web.IDropTarget);
Telerik.Web.UI.DocumentDropZone=new Telerik.Web.UI._documentDropZone();
Telerik.Web.DragDropManager.registerDropTarget(Telerik.Web.UI.DocumentDropZone,true);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();