﻿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.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._width="300px";
this._height=null;
this._uniqueID=null;
this._uniqueName=null;
this._grip=null;
this._titleBar=null;
this._commandsContainer=null;
this._contentContainer=null;
this._handle=null;
this._form=null;
this.set_handle=this.set_handle;
this._isCustomHandle=false;
};
Telerik.Web.UI.RadDock.DragDataType="RadDock";
Telerik.Web.UI.RadDock.prototype={getCommand:function(_2){
return this._commands?this._commands[_2]:null;
},get_handle:function(){
return this._handle;
},set_handle:function(_3){
this._isCustomHandle=true;
this._setHandle(_3);
},_setHandle:function(_4){
this._disposeDrag();
this._handle=_4;
this._initializeDrag();
},_radShowHelper:function(){
if(this.get_closed()){
return;
}
this._setContentContainerHeight();
this._setCommandsContainerWidth();
},initialize:function(){
Telerik.Web.UI.RadDock.callBaseMethod(this,"initialize");
this._initializeHtmlElementVariables();
var me=this;
this.get_element().RadShow=function(){
window.setTimeout(function(){
me._radShowHelper();
},10);
};
this._initializeCommands();
this._setPinUnpinVisibility();
this._setContentContainerHeight();
this._setHandle(this._titleBar||this._grip);
this.raise_initialize();
},dispose:function(){
this.get_element().RadShow=null;
this._disposeDrag();
Telerik.Web.UI.RadDock.callBaseMethod(this,"dispose");
},undock:function(){
var _6=this.get_element();
this._form.appendChild(_6);
var _7=this._getLocation(_6);
this.set_left(_7.x);
this.set_top(_7.y);
var _8=$find(this.get_dockZoneID());
if(_8){
this.set_dockZoneID("");
_8._resetDockIndices();
this._unfitWidth();
}
this._setPinUnpinVisibility();
this.updateClientState();
},_fitWidth:function(){
this.get_element().style.width="100%";
},_unfitWidth:function(){
this.get_element().style.width=this.get_width();
},_initializeHtmlElementVariables:function(){
this._grip=$get(this.get_id()+"_G");
this._titleBar=$get(this.get_id()+"_T");
if(this._titleBar){
var _9=this._titleBar.lastChild;
while(_9){
if(_9.className=="rdCommands"){
this._commandsContainer=_9;
break;
}
_9=_9.previousSibling;
}
}
this._contentContainer=$get(this.get_id()+"_C");
var _a=this.get_element().parentNode;
while(_a){
if(_a.tagName.toLowerCase()==="form"){
this._form=_a;
break;
}
_a=_a.parentNode;
}
},_initializeCommands:function(){
if(!this._commandsContainer){
return;
}
var _b=this._commandsContainer.getElementsByTagName("a");
var _c=this._commands;
if(_c){
this._commands={};
for(var i=0;i<_c.length;i++){
var _e=_c[i];
var _f=eval(_e.clientTypeName);
if(_f==Telerik.Web.UI.DockCommand||_f.inheritsFrom(Telerik.Web.UI.DockCommand)){
_e.radDock=this;
var _10=null;
if(_e.command){
_10={"command":eval(_e.command)};
delete _e.command;
}
var cmd=$create(_f,_e,_10,null,_b[i]);
this._commands[cmd.get_name()]=cmd;
}else{
throw Error.invalidOperation(_e.clientTypeName+" does not inherit from Telerik.Web.UI.DockCommand.");
}
}
}
},_setPinUnpinVisibility:function(){
var _12=this.getCommand("PinUnpin");
if(_12){
_12.get_element().style.display=this.get_dockZoneID()?"none":"inline";
}
this._setCommandsContainerWidth();
},_setCommandsContainerWidth:function(){
if(!this._commandsContainer){
return;
}
var _13=this._commandsContainer.getElementsByTagName("a");
var _14=0;
for(var i=0;i<_13.length;i++){
var _16=this._getBoundsWithBorderAndMargin(_13[i]);
_14+=_16.width;
}
this._commandsContainer.style.width=_14+"px";
},_getBoundsWithBorderAndMargin:function(_17){
if(!_17){
_17=this.get_element();
}
var _18=this._getBounds(_17);
var _19=this._getMarginBox(_17);
var _1a=this._getBorderBox(_17);
_18.width+=(_19.horizontal+_1a.horizontal);
_18.height+=(_19.vertical+_1a.vertical);
return _18;
},_getBounds:function(_1b){
if(!_1b){
_1b=this.get_element();
}
return Telerik.Web.DomElement.getBounds(_1b);
},_getMarginBox:function(_1c){
if(!_1c){
_1c=this.get_element();
}
return Telerik.Web.CommonScripts.getMarginBox(_1c);
},_getBorderBox:function(_1d){
if(!_1d){
_1d=this.get_element();
}
return Telerik.Web.CommonScripts.getBorderBox(_1d);
},_resetPosition:function(){
var _1e=this.get_element();
_1e.style.top="";
_1e.style.left="";
_1e.originalPosition="relative";
_1e.style.position="relative";
_1e.style.zIndex=this.originalZIndex;
},_setContentContainerHeight:function(){
if(!Telerik.Web.DomElement.containsCssClass(this.get_element(),"rdVariableHeight")){
var _1f=this._getBounds();
var _20=this.get_handle();
if(_20&&!this._isCustomHandle){
var _21=this._getBoundsWithBorderAndMargin(_20);
_1f.height-=_21.height;
}
var _22=_1f.height-2;
this._contentContainer.style.height=(_22<0?0:_22)+"px";
}else{
this._contentContainer.style.height="";
}
},_initializeDrag:function(){
this._disposeDrag();
if(this._handle&&this.get_enableDrag()&&!this.get_pinned()){
$addHandlers(this._handle,{"mousedown":this._mouseDownHandler},this);
Telerik.Web.DomElement.addCssClass(this._handle,"rdDraggable");
}
},_disposeDrag:function(){
if(this._handle){
$clearHandlers(this._handle);
Telerik.Web.DomElement.removeCssClass(this._handle,"rdDraggable");
}
},_mouseDownHandler:function(e){
window._event=e;
var _24=(0>Array.indexOf(["input","button","select","textarea","label","a"],e.target.tagName.toLowerCase()));
if(_24&&this.get_enableDrag()&&!this.get_pinned()){
e.preventDefault();
this._startDragDrop();
}
},_startDragDrop:function(){
var _25=this.get_element();
this.originalZIndex=_25.style.zIndex;
var _26=this._getBounds(_25);
var _27=this._getBorderBox(_25);
_26.width-=_27.horizontal;
_26.height-=_27.vertical;
_25.style.width=_26.width+"px";
_25.style.zIndex="9999999";
var _28=$telerikCommon.getLocationWithScrollOffset(_25);
this._form.appendChild(_25);
var _29=$find(this.get_dockZoneID());
if(_29){
_29._showPlaceholder(this);
}
this._setLocation(_28);
Telerik.Web.DragDropManager.startDragDrop(this,_25,null);
},_restorePosition:function(){
var _2a=$find(this.get_dockZoneID());
if(_2a){
_2a.dock(this,this.get_index());
}else{
this.undock();
}
},_getLocation:function(_2b){
if(!_2b){
_2b=this.get_element();
}
return Telerik.Web.DomElement.getLocation(_2b);
},_setLocation:function(_2c){
Telerik.Web.DomElement.setLocation(this.get_element(),_2c);
},saveClientState:function(){
var _2d={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(_2d);
},conditionalPostback:function(_2e){
if(this.get_autoPostBack()){
this.doPostBack(_2e);
}
},doPostBack:function(_2f){
__doPostBack(this.get_uniqueID(),_2f);
},get_dragDataType:function(){
return Telerik.Web.UI.RadDock.DragDataType;
},getDragData:function(_30){
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(_31){
this.raise_dragEnd(new Sys.EventArgs());
if(_31){
this._restorePosition();
}
},add_command:function(_32){
this.get_events().addHandler("command",_32);
},remove_command:function(_33){
this.get_events().removeHandler("command",_33);
},raise_command:function(_34){
this.raiseEvent("command",_34);
},add_dragStart:function(_35){
this.get_events().addHandler("dragStart",_35);
},remove_dragStart:function(_36){
this.get_events().removeHandler("dragStart",_36);
},raise_dragStart:function(_37){
this.raiseEvent("dragStart",_37);
},add_drag:function(_38){
this.get_events().addHandler("drag",_38);
},remove_drag:function(_39){
this.get_events().removeHandler("drag",_39);
},raise_drag:function(_3a){
this.raiseEvent("drag",_3a);
},add_dragEnd:function(_3b){
this.get_events().addHandler("dragEnd",_3b);
},remove_dragEnd:function(_3c){
this.get_events().removeHandler("dragEnd",_3c);
},raise_dragEnd:function(_3d){
this.raiseEvent("dragEnd",_3d);
},add_dockPositionChanged:function(_3e){
this.get_events().addHandler("dockPositionChanged",_3e);
},remove_dockPositionChanged:function(_3f){
this.get_events().removeHandler("dockPositionChanged",_3f);
},raise_dockPositionChanged:function(_40){
this.raiseEvent("dockPositionChanged",_40);
this.conditionalPostback("dockPositionChanged");
},add_dockPositionChanging:function(_41){
this.get_events().addHandler("dockPositionChanging",_41);
},remove_dockPositionChanging:function(_42){
this.get_events().removeHandler("dockPositionChanging",_42);
},raise_dockPositionChanging:function(_43){
this.raiseEvent("dockPositionChanging",_43);
},add_initialize:function(_44){
this.get_events().addHandler("initialize",_44);
},remove_initialize:function(_45){
this.get_events().removeHandler("initialize",_45);
},raise_initialize:function(_46){
this.raiseEvent("initialize",_46);
},get_top:function(){
return this._top;
},set_top:function(_47){
this._top=_47;
},get_left:function(){
return this._left;
},set_left:function(_48){
this._left=_48;
},get_closed:function(){
return this._closed;
},set_closed:function(_49){
this._closed=_49;
var _4a=this.get_element();
_4a.style.display=_49?"none":"block";
if(!_49){
this._radShowHelper();
Telerik.Web.UI.CallRadShow(_4a);
}
},get_collapsed:function(){
return this._collapsed;
},set_collapsed:function(_4b){
this._collapsed=_4b;
this.get_element().style.height=_4b?"auto":this.get_height();
if(this._collapsed){
this.addCssClass("rdCollapsed");
}else{
this.removeCssClass("rdCollapsed");
if(this.get_height()==null){
this.addCssClass("rdVariableHeight");
}
}
this._setContentContainerHeight();
if(!this._collapsed){
Telerik.Web.UI.CallRadShow(this._contentContainer);
}
var _4c=this.getCommand("ExpandCollapse");
if(_4c){
_4c.set_state(_4b?2:1);
}
},get_autoPostBack:function(){
return this._autoPostBack;
},set_autoPostBack:function(_4d){
this._autoPostBack=_4d;
},get_commands:function(){
return this._commands;
},set_commands:function(_4e){
this._commands=_4e;
},get_dockMode:function(){
return this._dockMode;
},set_dockMode:function(_4f){
this._dockMode=_4f;
},get_dockZoneID:function(){
return this._dockZoneID;
},set_dockZoneID:function(_50){
this._dockZoneID=_50;
},get_forbiddenZones:function(){
return this._forbiddenZones;
},set_forbiddenZones:function(_51){
this._forbiddenZones=_51;
},get_height:function(){
return this._height;
},set_height:function(_52){
this._height=_52;
},get_index:function(){
return this._index;
},set_index:function(_53){
this._index=_53;
},get_layoutID:function(){
return this._layoutID;
},set_layoutID:function(_54){
this._layoutID=_54;
},get_enableDrag:function(){
return this._enableDrag;
},set_enableDrag:function(_55){
this._enableDrag=_55;
this._initializeDrag();
},get_pinned:function(){
return this._pinned;
},set_pinned:function(_56){
this._pinned=_56;
var ddm=Telerik.Web.DragDropManager._getInstance();
var _58=this.get_element();
var _59=this._getLocation(_58);
if(_56){
_59=ddm.subtractPoints(_59,ddm.getScrollOffset(_58,true));
this.get_element().style.position="fixed";
this.set_enableDrag(false);
}else{
_59=ddm.addPoints(_59,ddm.getScrollOffset(_58,true));
this._setLocation(_59);
this.set_enableDrag(true);
}
var _5a=this.getCommand("PinUnpin");
if(_5a){
_5a.set_state(_56?2:1);
}
},get_title:function(){
return this._title;
},set_title:function(_5b){
this._title=_5b;
},get_uniqueID:function(){
return this._uniqueID;
},set_uniqueID:function(_5c){
this._uniqueID=_5c;
},get_uniqueName:function(){
return this._uniqueName;
},set_uniqueName:function(_5d){
this._uniqueName=_5d;
},get_width:function(){
return this._width;
},set_width:function(_5e){
this._width=_5e;
}};
$telerikCommon.makeCompatible(Telerik.Web.UI.RadDock);
Telerik.Web.UI.RadDock.registerClass("Telerik.Web.UI.RadDock",Telerik.Web.UI.RadWebControl,Telerik.Web.IDragSource);
Telerik.Web.UI.CallRadResize=function(_5f){
var _60=_5f.getElementsByTagName("*");
for(var i=0;i<_60.length;i++){
var _62=_60[i];
if(_62.RadResize){
_62.RadResize();
}
}
};
Telerik.Web.UI.CallRadShow=function(_63){
var _64=_63.getElementsByTagName("*");
for(var i=0;i<_64.length;i++){
var _66=_64[i];
if(_66.RadShow){
_66.RadShow();
}
}
};
Telerik.Web.UI.DockCommand=function(_67){
Telerik.Web.UI.DockCommand.initializeBase(this,[_67]);
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(_68){
this.get_events().addHandler("command",_68);
},remove_command:function(_69){
this.get_events().removeHandler("command",_69);
},raise_command:function(_6a){
var _6b=this.get_events().getHandler("command");
if(_6b){
_6b(this.get_radDock(),_6a);
}
},get_clientTypeName:function(){
return this._clientTypeName;
},set_clientTypeName:function(_6c){
this._clientTypeName=_6c;
},get_cssClass:function(){
return this._cssClass;
},set_cssClass:function(_6d){
this._cssClass=_6d;
},get_name:function(){
return this._name;
},set_name:function(_6e){
this._name=_6e;
},get_text:function(){
return this._text;
},set_text:function(_6f){
this._text=_6f;
},get_autoPostBack:function(){
return this._autoPostBack;
},set_autoPostBack:function(_70){
this._autoPostBack=_70;
},get_radDock:function(){
return this._radDock;
},set_radDock:function(_71){
this._radDock=_71;
},onCommand:function(e){
var _73=new Sys.CancelEventArgs();
_73.command=this;
_73.Command=this;
this.raise_command(_73);
if(_73.get_cancel()){
return;
}
this.get_radDock().raise_command(_73);
if(_73.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");
}};
$telerikCommon.makeCompatible(Telerik.Web.UI.DockCommand);
Telerik.Web.UI.DockCommand.registerClass("Telerik.Web.UI.DockCommand",Sys.UI.Control);
Telerik.Web.UI.DockToggleCommand=function(_74){
Telerik.Web.UI.DockToggleCommand.initializeBase(this,[_74]);
this._state=1;
this._alternateCssClass="rdCustom";
this._alternateText="Custom";
};
Telerik.Web.UI.DockToggleCommand.prototype={get_state:function(){
return this._state;
},set_state:function(_75){
this._state=_75;
var _76=this.get_element();
if(_75===1){
_76.title=this.get_text();
Telerik.Web.DomElement.addCssClass(_76,this.get_cssClass());
Telerik.Web.DomElement.removeCssClass(_76,this.get_alternateCssClass());
}else{
_76.title=this.get_alternateText();
Telerik.Web.DomElement.addCssClass(_76,this.get_alternateCssClass());
Telerik.Web.DomElement.removeCssClass(_76,this.get_cssClass());
}
},get_alternateCssClass:function(){
return this._alternateCssClass;
},set_alternateCssClass:function(_77){
this._alternateCssClass=_77;
},get_alternateText:function(){
return this._alternateText;
},set_alternateText:function(_78){
this._alternateText=_78;
},initialize:function(){
Telerik.Web.UI.DockToggleCommand.callBaseMethod(this,"initialize");
},dispose:function(){
Telerik.Web.UI.DockToggleCommand.callBaseMethod(this,"dispose");
}};
$telerikCommon.makeCompatible(Telerik.Web.UI.DockToggleCommand);
Telerik.Web.UI.DockToggleCommand.registerClass("Telerik.Web.UI.DockToggleCommand",Telerik.Web.UI.DockCommand);
Telerik.Web.UI.DockCloseCommand=function(_79){
Telerik.Web.UI.DockCloseCommand.initializeBase(this,[_79]);
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");
}};
$telerikCommon.makeCompatible(Telerik.Web.UI.DockCloseCommand);
Telerik.Web.UI.DockCloseCommand.registerClass("Telerik.Web.UI.DockCloseCommand",Telerik.Web.UI.DockCommand);
Telerik.Web.UI.DockExpandCollapseCommand=function(_7b){
Telerik.Web.UI.DockExpandCollapseCommand.initializeBase(this,[_7b]);
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");
}};
$telerikCommon.makeCompatible(Telerik.Web.UI.DockExpandCollapseCommand);
Telerik.Web.UI.DockExpandCollapseCommand.registerClass("Telerik.Web.UI.DockExpandCollapseCommand",Telerik.Web.UI.DockToggleCommand);
Telerik.Web.UI.DockPinUnpinCommand=function(_7d){
Telerik.Web.UI.DockPinUnpinCommand.initializeBase(this,[_7d]);
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");
}};
$telerikCommon.makeCompatible(Telerik.Web.UI.DockPinUnpinCommand);
Telerik.Web.UI.DockPinUnpinCommand.registerClass("Telerik.Web.UI.DockPinUnpinCommand",Telerik.Web.UI.DockToggleCommand);
Telerik.Web.UI._documentDropZone=function(_7f){
};
Telerik.Web.UI._documentDropZone.prototype={get_dropTargetElement:function(){
return (Telerik.Web.Browser.renderMode==Telerik.Web.Browser.StandardsMode)?document.body:document.documentElement;
},canDrop:function(_80,_81,_82){
return (_81===Telerik.Web.UI.RadDock.DragDataType&&(_82.get_dockMode()&Telerik.Web.UI.DockMode.Floating)>0);
},drop:function(_83,_84,_85){
var _86=new Sys.CancelEventArgs();
_85.raise_dockPositionChanging(_86);
if(_86.get_cancel()){
_85._restorePosition();
}else{
_85.undock();
_85.raise_dockPositionChanged(new Sys.EventArgs());
}
},onDragEnterTarget:function(_87,_88,_89){
},onDragLeaveTarget:function(_8a,_8b,_8c){
},onDragInTarget:function(_8d,_8e,_8f){
}};
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();