Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RecurrenceState=function(){
};
Telerik.Web.UI.RecurrenceState.prototype={NotRecurring:0,Master:1,Occurrence:2,Exception:3};
Telerik.Web.UI.RecurrenceState.registerEnum("Telerik.Web.UI.RecurrenceState");
Telerik.Web.UI.SchedulerAppointment=function(_1,_2,_3){
this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection(this);
if(!_1){
return;
}
this._id=_1.id;
this._subject=_1.subject;
this._start=new Date(Date.parse(_1.start));
this._end=new Date(Date.parse(_1.end));
this._toolTip=_1.toolTip;
this._internalID=_1.internalID;
this._visible=_1.visible;
this._recurrenceState=_1.recurrenceState;
this._recurrenceParentID=_1.recurrenceParentID;
this._serializedResources=_1.resources;
this._resources=null;
this._domElements=_1.domElements;
this._domElement=null;
this._allowEdit=null;
if(typeof (_1.allowEdit)!="undefined"){
this._allowEdit=_1.allowEdit;
}
this._allowDelete=null;
if(typeof (_1.allowDelete)!="undefined"){
this._allowDelete=_1.allowDelete;
}
this._radScheduler=_2;
this._oldZIndex=null;
this._originalParent=null;
this._selected=false;
if(typeof (_1.attributes)!="undefined"){
this._attributes._load(_1.attributes);
}
};
Telerik.Web.UI.SchedulerAppointment._incrementMilliseconds=function(_4,_5){
_4.setTime(_4.getTime()+_5);
};
Telerik.Web.UI.SchedulerAppointment.prototype={get_id:function(){
return this._id;
},get_subject:function(){
return this._subject;
},set_subject:function(_6){
this._subject=_6;
},get_start:function(){
return this._start;
},set_start:function(_7){
this._start=_7;
},get_end:function(){
return this._end;
},set_end:function(_8){
this._end=_8;
},get_toolTip:function(){
return this._toolTip;
},set_toolTip:function(_9){
this._toolTip=_9;
},get_radScheduler:function(){
return this._radScheduler;
},get_allowEdit:function(){
return this._allowEdit;
},set_allowEdit:function(_a){
this._allowEdit=_a;
},get_allowDelete:function(){
return this._allowDelete;
},set_allowDelete:function(_b){
this._allowDelete=_b;
},get_element:function(){
if(!this._domElement&&this._domElements.length>0){
this._domElement=$get(this._domElements[0]);
}
return this._domElement;
},get_attributes:function(){
return this._attributes;
},get_recurrenceState:function(){
return this._recurrenceState;
},get_recurrenceParentID:function(){
return this._recurrenceParentID;
},get_resources:function(){
if(!this._resources){
this._resources=new Telerik.Web.UI.SchedulerResourceCollection();
for(var _c in this._serializedResources){
var _d=this._serializedResources[_c];
if(_d.text){
this._resources.add(new Telerik.Web.UI.SchedulerResource(_d));
}else{
var _e=this.get_radScheduler().get_resources().getResourcesByType(_d.type);
var _f=this._resources;
_e.forEach(function(_10){
if(_10.get_key()==_d.key){
_f.add(_10);
}
});
}
}
}
return this._resources;
},edit:function(){
var _11=this.get_radScheduler();
if(_11){
_11.editAppointment(this);
}
},remove:function(){
var _12=this.get_radScheduler();
if(_12){
_12.deleteAppointment(this);
}
},_getDuration:function(){
return this._end-this._start;
},_setDuration:function(_13){
var _14=this.get_element();
var _15=_13/60000;
var _16=_14.parentNode.parentNode.offsetHeight;
var _17=$telerik.getBorderWidth(_14.parentNode.parentNode,Telerik.Web.BoxSide.Bottom);
var _18=((_15/this.get_radScheduler().get_minutesPerRow())*_16)-_17;
var _19=parseInt(_14.style.paddingBottom);
if(isNaN(_19)){
_19=0;
}
_14.style.height=_18-_19+"px";
if($telerik.isIE&&$telerik.quirksMode){
var _1a=_14.firstChild;
_1a.style.height="";
Telerik.Web.UI.RadScheduler._adjustSingleAppointmentHeight(_14,_14._initialHeightInRows,1);
}
Telerik.Web.UI.RadScheduler._fixIEBottom(_14);
this._end.setTime(this._start.getTime());
Telerik.Web.UI.SchedulerAppointment._incrementMilliseconds(this._end,_13);
},_startDrag:function(){
var _1b=this.get_element();
var _1c=$telerik.getElementByClassName(_1b,"rsAptWrap","div");
var _1d=this.get_radScheduler().get_element();
this._dragTimeout=window.setTimeout(function(){
$telerik.setOpacity(_1c,0.6);
_1d.style.cursor="move";
},100);
this._oldZIndex=_1b.style.zIndex;
_1b.style.zIndex=999;
this._originalParent=_1b.parentNode;
Sys.UI.DomElement.removeCssClass(_1b,"rsWAppointmentDelete");
},_endDrag:function(_1e){
this._finishDrag(_1e,false);
},_abortDrag:function(){
this._finishDrag(null,true);
},_finishDrag:function(_1f,_20){
var _21=this.get_radScheduler();
window.clearTimeout(this._dragTimeout);
var _1f=this.get_element();
var _22=$telerik.getElementByClassName(_1f,"rsAptWrap","div");
$telerik.setOpacity(_22,1);
_1f.style.zindex=this._oldZIndex;
var _23=this.get_radScheduler().get_element();
if(_23&&_23.style){
this.get_radScheduler().get_element().style.cursor="";
}
var _24;
var _25=this._getDuration();
var _26="Move";
if(this._originalParent.parentNode==_1f||_20){
if(_1f.parentNode!=this._originalParent){
this._originalParent.appendChild(_1f);
}
return;
}
var _27=_21._activeModel.getTimeSlotFromDomElement(this._originalParent.parentNode);
var _28=_21._activeModel.getTimeSlotFromDomElement(_1f);
_24={Command:_26,AppointmentID:this._internalID,EditSeries:false,SourceSlotIndex:_27.get_index(),TargetSlotIndex:_28.get_index()};
var _29={OnConfirm:this._onAppointmentMoveCallback,OnAbort:this._onAppointmentMoveAbortCallback,Scheduler:this.get_radScheduler(),Appointment:this,TargetSlot:_28,PostbackEvent:_24,CallbackIsCalledFromDialog:true};
if(_21.get_displayRecurrenceActionDialogOnMove()&&(this._recurrenceState==1||this._recurrenceState==2)){
var _2a=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(_29.Appointment,Telerik.Web.UI.RecurrenceAction.Move);
_21.raise_recurrenceActionDialogShowing(_2a);
if(_2a.get_cancel()){
var _2b=_2a.get_editSeries();
if(_2b!==null){
_29.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(_2b,_29);
}else{
this._onAppointmentMoveAbortCallback(_29);
}
}else{
_21._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Move,_29);
}
}else{
_29.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(false,_29);
}
},_onAppointmentMoveCallback:function(_2c,_2d){
if(_2d.CallbackIsCalledFromDialog){
var _2e=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(_2d.Appointment,Telerik.Web.UI.RecurrenceAction.Move,_2c);
_2d.Scheduler.raise_recurrenceActionDialogClosed(_2e);
}
var _2f=new Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs(_2d.Appointment,_2d.TargetSlot.get_startTime(),_2c,_2d.TargetSlot);
_2d.Scheduler.raiseEvent("appointmentMoveEnd",_2f);
if(_2f.get_cancel()==false){
_2d.PostbackEvent.EditSeries=_2c;
_2d.Scheduler.postback(_2d.PostbackEvent);
}else{
_2d.Appointment._abortDrag();
}
},_onAppointmentMoveAbortCallback:function(_30){
_30.Appointment._abortDrag();
},_select:function(){
this._selected=true;
},_unselect:function(){
this._selected=false;
}};
Telerik.Web.UI.SchedulerAppointment.registerClass("Telerik.Web.UI.SchedulerAppointment");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointmentCollection=function(){
this._array=new Array();
};
Telerik.Web.UI.SchedulerAppointmentCollection.prototype={add:function(_31){
var _32=this._array.length;
this.insert(_32,_31);
},insert:function(_33,_34){
Array.insert(this._array,_33,_34);
},remove:function(_35){
Array.remove(this._array,_35);
},removeAt:function(_36){
var _37=this.getAppointment(_36);
if(_37){
this.remove(_37);
}
},clear:function(){
this._array=new Array();
},get_count:function(){
return this._array.length;
},getAppointment:function(_38){
return this._array[_38];
},indexOf:function(_39){
return Array.indexOf(this._array,_39);
},forEach:function(_3a){
for(var i=0,_3c=this.get_count();i<_3c;i++){
_3a(this.getAppointment(i));
}
},getAppointmentsInRange:function(_3d,end){
var _3f=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(_40){
var _41=_40.get_start();
var _42=_40.get_end();
if(_41<end&&_42>_3d){
_3f.add(_40);
}
});
return _3f;
},getAppointmentsStartingInRange:function(_43,end){
var _45=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(_46){
var _47=_46.get_start();
if(_47>=_43&&_47<end){
_45.add(_46);
}
});
return _45;
},findByID:function(id){
var _49;
this.forEach(function(_4a){
if(_4a.get_id()==id){
_49=_4a;
}
});
return _49;
}};
Telerik.Web.UI.SchedulerAppointmentCollection.registerClass("Telerik.Web.UI.SchedulerAppointmentCollection");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointmentEventArgs=function(_4b){
Telerik.Web.UI.SchedulerAppointmentEventArgs.initializeBase(this);
this._appointment=_4b;
};
Telerik.Web.UI.SchedulerAppointmentEventArgs.prototype={get_appointment:function(){
return this._appointment;
}};
Telerik.Web.UI.SchedulerAppointmentEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentEventArgs",Sys.EventArgs);
Telerik.Web.UI.SchedulerAppointmentCancelEventArgs=function(_4c){
Telerik.Web.UI.SchedulerAppointmentCancelEventArgs.initializeBase(this);
this._appointment=_4c;
};
Telerik.Web.UI.SchedulerAppointmentCancelEventArgs.prototype={get_appointment:function(){
return this._appointment;
}};
Telerik.Web.UI.SchedulerAppointmentCancelEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentCancelEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentClickEventArgs=function(_4d){
Telerik.Web.UI.SchedulerAppointmentClickEventArgs.initializeBase(this,[_4d]);
};
Telerik.Web.UI.SchedulerAppointmentClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentClickEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs=function(_4e,_4f,_50){
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.initializeBase(this);
this._startTime=_4e;
this._isAllDay=_4f;
this._targetSlot=_50;
};
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.prototype={get_startTime:function(){
return this._startTime;
},get_isAllDay:function(){
return this._isAllDay;
},get_targetSlot:function(){
return this._targetSlot;
}};
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs=function(_51){
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs.initializeBase(this,[_51]);
};
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs=function(_52,_53,_54){
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs.initializeBase(this,[_52]);
this._newTime=_53;
this._editingRecurringSeries=_54;
};
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs.prototype={get_newTime:function(){
return this._newTime;
},get_editingRecurringSeries:function(){
return this._editingRecurringSeries;
}};
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentResizingEventArgs=function(_55,_56){
Telerik.Web.UI.SchedulerAppointmentResizingEventArgs.initializeBase(this,[_55]);
this._targetSlot=_56;
};
Telerik.Web.UI.SchedulerAppointmentResizingEventArgs.prototype={get_targetSlot:function(){
return this._targetSlot;
}};
Telerik.Web.UI.SchedulerAppointmentResizingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizingEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs=function(_57,_58){
Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs.initializeBase(this,[_57]);
this._editingRecurringSeries=_58;
};
Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs.prototype={get_editingRecurringSeries:function(){
return this._editingRecurringSeries;
}};
Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs=function(_59){
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs.initializeBase(this,[_59]);
};
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs=function(_5a,_5b){
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs.initializeBase(this,[_5a]);
this._editingRecurringSeries=_5b;
};
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs.prototype={get_editingRecurringSeries:function(){
return this._editingRecurringSeries;
}};
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentEditingEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs=function(_5c){
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs.initializeBase(this,[_5c]);
};
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs=function(_5d,_5e){
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs.initializeBase(this,[_5d]);
this._targetSlot=_5e;
};
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs.prototype={get_targetSlot:function(){
return this._targetSlot;
}};
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMovingEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs=function(_5f,_60,_61,_62){
Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs.initializeBase(this,[_5f]);
this._targetSlot=_62;
this._newStartTime=_60;
this._editingRecurringSeries=_61;
};
Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs.prototype={get_newStartTime:function(){
return this._newStartTime;
},get_editingRecurringSeries:function(){
return this._editingRecurringSeries;
},get_targetSlot:function(){
return this._targetSlot;
}};
Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs=function(_63,_64){
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs.initializeBase(this);
this._time=_63;
this._targetSlot=_64;
};
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs.prototype={get_time:function(){
return this._time;
},get_targetSlot:function(){
return this._targetSlot;
}};
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs.registerClass("Telerik.Web.UI.SchedulerTimeSlotClickEventArgs",Sys.EventArgs);
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs=function(_65){
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs.initializeBase(this,[_65]);
};
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs=function(_66,_67){
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.initializeBase(this,[_66]);
this._recurrenceAction=_67;
this._editSeries=null;
};
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.prototype={get_recurrenceAction:function(){
return this._recurrenceAction;
},get_editSeries:function(){
return this._editSeries;
},set_editSeries:function(_68){
this._editSeries=_68;
}};
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs=function(_69,_6a,_6b){
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs.initializeBase(this,[_69]);
this._recurrenceAction=_6a;
this._editSeries=_6b;
};
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs.prototype={get_recurrenceAction:function(){
return this._recurrenceAction;
},get_editSeries:function(){
return this._editSeries;
}};
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerFormCreatedEventArgs=function(_6c,_6d){
Telerik.Web.UI.SchedulerFormCreatedEventArgs.initializeBase(this,[_6c]);
this._formElement=_6d;
};
Telerik.Web.UI.SchedulerFormCreatedEventArgs.prototype={get_formElement:function(){
return this._formElement;
}};
Telerik.Web.UI.SchedulerFormCreatedEventArgs.registerClass("Telerik.Web.UI.SchedulerFormCreatedEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs=function(_6e,_6f){
Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs.initializeBase(this,[_6e]);
this._domEvent=_6f;
};
Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs.prototype={get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs=function(_70,_71,_72,_73){
Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs.initializeBase(this);
this._time=_70;
this._isAllDay=_71;
this._domEvent=_72;
this._targetSlot=_73;
};
Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs.prototype={get_time:function(){
return this._time;
},get_isAllDay:function(){
return this._isAllDay;
},get_domEvent:function(){
return this._domEvent;
},get_targetSlot:function(){
return this._targetSlot;
}};
Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs.registerClass("Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs",Sys.EventArgs);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerViewType=function(){
};
Telerik.Web.UI.SchedulerViewType.prototype={DayView:0,WeekView:1,MonthView:2,ResourceView:3,TimelineView:4};
Telerik.Web.UI.SchedulerViewType.registerEnum("Telerik.Web.UI.SchedulerViewType");
Telerik.Web.UI.RadScheduler=function(_74){
Telerik.Web.UI.RadScheduler.initializeBase(this,[_74]);
this._styles={dragTarget:"rsDragTarget"};
this._postBackReference=null;
this._minutesPerRow=30;
this._numberOfHoveredRows=2;
this._selectedView=0;
this._readOnly=false;
this._overflowBehavior=1;
this._shouldPostbackOnClick=true;
this._displayDeleteConfirmation=true;
this._displayRecurrenceActionDialogOnMove=false;
this._firstDayStart=null;
this._appointments=null;
this._currentAppointment=null;
this._resources=null;
this._scrollTop=0;
this._localization=null;
this._shouldFireFormCreated=false;
this._inlineFormDiv=null;
this._advancedFormDiv=null;
this._advancedTemplate=null;
this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection();
this._allowEdit=true;
this._allowDelete=true;
this._allowInsert=true;
this._enableAdvancedTemplateScript=false;
this._dragging=false;
this._editing=false;
this._draggingAppointment=null;
this._selectedAppointment=null;
this._onKeyboardEventDelegate=null;
this._updateScrollTopDelegate=null;
this._modelClassName=null;
this._modelData={};
this._activeModel=null;
this._modelTables=null;
this._resizingState={};
this._eventMap=new Telerik.Web.UI.EventMap();
this._recurrenceActionDialog=new Telerik.Web.UI.RecurrenceActionDialog(this);
};
Telerik.Web.UI.RadScheduler._adjustHeight=function(_75){
var _76=$get(_75);
var _77=_76.offsetHeight;
var _78=_77;
var _79=null;
var _7a=_76.childNodes;
var _7b=_7a.length;
for(var i=0;i<_7b;i++){
var _7d=_7a[i];
if(_7d.tagName&&_7d.tagName.toLowerCase()=="div"){
if(Sys.UI.DomElement.containsCssClass(_7d,"rsContent")){
_79=_7d;
}else{
_78-=_7d.offsetHeight;
}
}
}
if(_79!=null){
var _7e=$telerik.getPaddingBox(_79).vertical;
var _7f=$telerik.getBorderBox(_79).vertical;
_78-=_7e+_7f;
_78=Math.max(_78,50);
if(_78!=_79.offsetHeight){
_79.style.height=_78+"px";
}
}
var _80=$telerik.getElementByClassName(_76,"rsAllDayLastCell","td");
if(_80){
_80.firstChild.style.width=(Telerik.Web.UI.RadScheduler._getScrollBarWidth()-1)+"px";
}
var _81=$telerik.getElementByClassName(_76,"rsColumnHeaderLastCell","td");
if(_81){
_81.firstChild.style.width=(Telerik.Web.UI.RadScheduler._getScrollBarWidth()-1)+"px";
}
};
Telerik.Web.UI.RadScheduler._incrementTime=function(_82,_83,_84){
if(isNaN(_84)){
_84=0;
}
_82.setTime(_82.getTime()+(_83*3600000)+(_84*60000));
};
Telerik.Web.UI.RadScheduler._getScrollBarWidth=function(){
if(Telerik.Web.UI.RadScheduler._scrollbarWidth){
return Telerik.Web.UI.RadScheduler._scrollbarWidth;
}
var _85,_86=0;
var _87=document.createElement("div");
_87.style.position="absolute";
_87.style.top="-1000px";
_87.style.left="-1000px";
_87.style.width="100px";
_87.style.height="50px";
_87.style.overflow="hidden";
var _88=document.createElement("div");
_88.style.width="100%";
_88.style.height="200px";
_87.appendChild(_88);
document.body.appendChild(_87);
var _89=_88.offsetWidth;
_87.style.overflow="auto";
var _8a=_88.offsetWidth;
Telerik.Web.UI.RadScheduler._scrollbarWidth=_89-_8a;
if(Telerik.Web.UI.RadScheduler._scrollbarWidth<=0){
_88.style.width="300px";
_85=_87.offsetWidth;
_86=_87.clientWidth;
Telerik.Web.UI.RadScheduler._scrollbarWidth=_85-_86;
}
if(Telerik.Web.UI.RadScheduler._scrollbarWidth<=0){
Telerik.Web.UI.RadScheduler._scrollbarWidth=16;
}
document.body.removeChild(document.body.lastChild);
return Telerik.Web.UI.RadScheduler._scrollbarWidth;
};
Telerik.Web.UI.RadScheduler._preInitialize=function(_8b,_8c){
var _8d=$get(_8b);
var _8e=$telerik.getElementByClassName(_8d,"rsContent","div");
if(_8e){
_8e.scrollTop=_8c;
}
Telerik.Web.UI.RadScheduler._adjustAppointmentsHeight(_8b);
};
Telerik.Web.UI.RadScheduler._adjustAppointmentsHeight=function(_8f){
if(!($telerik.isIE&&$telerik.quirksMode)){
return;
}
var _90=$get(_8f);
var _91=_90.getElementsByTagName("div");
for(var i=0;i<_91.length;i++){
var _93=_91[i];
if(!Sys.UI.DomElement.containsCssClass(_93,"rsApt")){
continue;
}
var _94=parseInt(_93.offsetHeight);
if(_94==0){
return;
}
if(!_93.style.height.endsWith("%")){
return;
}
var _95=parseInt(_93.style.height)/100;
Telerik.Web.UI.RadScheduler._adjustSingleAppointmentHeight(_93,_95);
_93._initialHeightInRows=_95;
}
};
Telerik.Web.UI.RadScheduler._adjustSingleAppointmentHeight=function(_96,_97){
var _98=_96.parentNode.parentNode;
var _99=$telerik.getBorderBox(_98).vertical;
var _9a=_99*2;
var _9b=parseInt(_96.offsetHeight);
var _9c=_9b+(_97*_9a)+_99;
var _9d=$telerik.getPaddingBox(_96).vertical;
_9c=_9c-_9d;
_96.style.height=_9c+"px";
var _9e=_96.firstChild;
_9e.style.height=_9c+"px";
Telerik.Web.UI.RadScheduler._fixIEBottom(_96);
};
Telerik.Web.UI.RadScheduler._fixIEBottom=function(_9f){
if($telerik.isIE6||($telerik.isIE&&$telerik.quirksMode)){
var _a0=$telerik.getElementByClassName(_9f,"rsAptBottom","div");
if(_9f.offsetHeight%2!=0){
_a0.style.bottom="-1px";
}else{
_a0.style.bottom="0px";
}
}
};
Telerik.Web.UI.RadScheduler.prototype={initialize:function(){
var _a1=this.get_element();
Telerik.Web.UI.RadScheduler.callBaseMethod(this,"initialize");
this._activeModel=new (Type.parse(this._modelClassName))(this,this._modelData);
this._activeModel.initialize();
this._eventMap.initialize(this);
var _a2=this.get_contentElement();
if(_a2){
_a2.scrollTop=this.get_scrollTop();
}
this.updateClientState();
this.repaint();
var _a3=$telerik.getFirstChildByTagName(_a1,"div",0);
if(_a3&&Sys.UI.DomElement.containsCssClass(_a3,"rsAdvancedEdit")){
this._advancedFormDiv=_a3;
if(typeof (Telerik.Web.UI.Scheduling)!="undefined"&&typeof (Telerik.Web.UI.Scheduling.AdvancedTemplate)!="undefined"&&this._enableAdvancedTemplateScript){
this._advancedTemplate=new Telerik.Web.UI.Scheduling.AdvancedTemplate(this._advancedFormDiv);
this._advancedTemplate.initialize();
}
}else{
this._eventMap.addHandlerForClassName("scroll","rsContent",this._updateScrollTop);
this._eventMap.addHandlerForClassName("dblclick","rsAptEdit",this._stopEventPropagation);
this._eventMap.addHandlerForClassName("dblclick","rsApt",this._onAppointmentDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsAllDayCell",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsCell",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("click","rsAptResize",this._onResizeGripMouseClick);
this._eventMap.addHandlerForClassName("click","rsApt",this._onAppointmentClick);
this._eventMap.addHandlerForClassName("click","rsAptDelete",this._onAppointmentDeleteClick);
this._eventMap.addHandlerForClassName("click","rsArrowTop",this._onPreviousDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowBottom",this._onNextDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowLeft",this._onPreviousDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowRight",this._onNextDayClick);
this._eventMap.addHandlerForClassName("click","rsNextDay",this._onNextSchedulerDayClick);
this._eventMap.addHandlerForClassName("click","rsPrevDay",this._onPreviousSchedulerDayClick);
this._eventMap.addHandlerForClassName("click","rsToday",this._onTodayClick);
this._eventMap.addHandlerForClassName("click","rsFullTime",this._onFullTimeLinkClick);
this._eventMap.addHandlerForClassName("click","rsAptEdit",this._onEditFormClick);
this._eventMap.addHandlerForClassName("click","rsShowMore",this._onShowMoreClick);
this._eventMap.addHandlerForClassName("click","rsHeaderDay",this._onDayViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderWeek",this._onWeekViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderMonth",this._onMonthViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderTimeline",this._onTimelineViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderMultiDay",this._onMultiDayViewTabClick);
this._eventMap.addHandlerForClassName("click","rsCell",this._onCellClick);
this._eventMap.addHandlerForClassName("click","rsAllDayCell",this._onCellClick);
this._eventMap.addHandlerForClassName("mouseover","rsCell",this._onRowMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsAllDayCell",this._onAllDayCellMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsApt",this._onAppointmentMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsAptResize",this._onResizeGripMouseOver);
this._eventMap.addHandlerForClassName("mouseout","rsCell",this._onRowMouseOut);
this._eventMap.addHandlerForClassName("mouseout","rsAllDayCell",this._onRowMouseOut);
this._eventMap.addHandlerForClassName("mouseout","rsApt",this._onAppointmentMouseOut);
this._eventMap.addHandlerForClassName("mousedown","rsAptDelete",this._stopEventPropagation);
this._eventMap.addHandlerForClassName("mousedown","rsApt",this._onAppointmentMouseDown);
this._eventMap.addHandlerForClassName("mousedown","rsAptResize",this._onResizeGripMouseDown);
this._eventMap.addHandlerForClassName("mouseup","rsCell",this._endDrag);
this._eventMap.addHandlerForClassName("contextmenu","rsApt",this._onAppointmentContextMenu);
this._eventMap.addHandlerForClassName("contextmenu","rsCell",this._onCellContextMenu);
this._eventMap.addHandlerForClassName("contextmenu","rsAllDayCell",this._onCellContextMenu);
var _a4=this.get_contentElement();
if(_a4){
this._updateScrollTopDelegate=Function.createDelegate(this,this._updateScrollTop);
$addHandler(this.get_contentElement(),"scroll",this._updateScrollTopDelegate);
}
this._onKeyboardEventDelegate=Function.createDelegate(this,this._onKeyboardEvent);
$addHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
}
this._onResizeGripMouseMoveDelegate=Function.createDelegate(this,this._onResizeGripMouseMove);
this._onResizeGripMouseUpDelegate=Function.createDelegate(this,this._onResizeGripMouseUp);
this._onSelectStartDelegate=Function.createDelegate(this,this._onSelectStart);
this._onDocMouseUpDelegate=Function.createDelegate(this,this._onDocMouseUp);
this._onDocumentMouseMoveDelegate=Function.createDelegate(this,this._onDocumentMouseMove);
this._fireFormCreated();
},dispose:function(){
var _a5=this.get_element();
if(this._onKeyboardEventDelegate){
$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
}
if(this._updateScrollTopDelegate){
$removeHandler(this.get_contentElement(),"scroll",this._updateScrollTopDelegate);
}
this._eventMap.dispose();
this._recurrenceActionDialog.dispose();
if(this._advancedTemplate){
this._advancedTemplate.dispose();
}
this._modelTables=null;
this._resizingState=null;
Telerik.Web.UI.RadScheduler.callBaseMethod(this,"dispose");
},repaint:function(){
if(this.get_overflowBehavior()==1){
Telerik.Web.UI.RadScheduler._adjustHeight(this.get_id());
if(typeof (Telerik.Web.UI.Scheduling)!="undefined"&&typeof (Telerik.Web.UI.Scheduling.AdvancedTemplate)!="undefined"){
Telerik.Web.UI.Scheduling.AdvancedTemplate._adjustHeight(this.get_id());
}
}
Telerik.Web.UI.RadScheduler._adjustAppointmentsHeight(this.get_id());
this._initializeModelTables();
},get_appointments:function(){
return this._appointments;
},set_appointments:function(_a6){
this._appointments=new Telerik.Web.UI.SchedulerAppointmentCollection();
var _a7=eval("("+_a6+")");
for(var i=0;i<_a7.length;i++){
var _a9=new Telerik.Web.UI.SchedulerAppointment(_a7[i],this);
this._appointments.add(_a9);
}
},get_resources:function(){
return this._resources;
},set_resources:function(_aa){
this._resources=new Telerik.Web.UI.SchedulerResourceCollection();
var _ab=Sys.Serialization.JavaScriptSerializer.deserialize(_aa);
for(var i=0;i<_ab.length;i++){
var _ad=new Telerik.Web.UI.SchedulerResource(_ab[i]);
this._resources.add(_ad);
}
},get_firstDayStart:function(){
return this._firstDayStart;
},set_firstDayStart:function(_ae){
this._firstDayStart=new Date(Date.parse(_ae));
},get_currentAppointment:function(){
return this._currentAppointment;
},set_currentAppointment:function(_af){
var _b0=Sys.Serialization.JavaScriptSerializer.deserialize(_af);
this._currentAppointment=new Telerik.Web.UI.SchedulerAppointment(_b0,this,null);
},get_localization:function(){
return this._localization;
},set_localization:function(_b1){
this._localization=Sys.Serialization.JavaScriptSerializer.deserialize(_b1);
},get_scrollTop:function(){
return this._scrollTop;
},set_scrollTop:function(_b2){
this._scrollTop=_b2;
},get_displayDeleteConfirmation:function(){
return this._displayDeleteConfirmation;
},set_displayDeleteConfirmation:function(_b3){
this._displayDeleteConfirmation=_b3;
},get_displayRecurrenceActionDialogOnMove:function(){
return this._displayRecurrenceActionDialogOnMove;
},set_displayRecurrenceActionDialogOnMove:function(_b4){
this._displayRecurrenceActionDialogOnMove=_b4;
},get_shouldPostbackOnClick:function(){
return this._shouldPostbackOnClick;
},set_shouldPostbackOnClick:function(_b5){
this._shouldPostbackOnClick=_b5;
},get_overflowBehavior:function(){
return this._overflowBehavior;
},set_overflowBehavior:function(_b6){
this._overflowBehavior=_b6;
},get_readOnly:function(){
return this._readOnly;
},set_readOnly:function(_b7){
this._readOnly=_b7;
},get_selectedView:function(){
return this._selectedView;
},set_selectedView:function(_b8){
this._selectedView=_b8;
},get_minutesPerRow:function(){
return this._minutesPerRow;
},set_minutesPerRow:function(_b9){
this._minutesPerRow=_b9;
},get_postBackReference:function(){
return this._postBackReference;
},set_postBackReference:function(_ba){
this._postBackReference=_ba;
},get_allowEdit:function(){
return this._allowEdit;
},set_allowEdit:function(_bb){
this._allowEdit=_bb;
},get_allowDelete:function(){
return this._allowDelete;
},set_allowDelete:function(_bc){
this._allowDelete=_bc;
},get_allowInsert:function(){
return this._allowInsert;
},set_allowInsert:function(_bd){
this._allowInsert=_bd;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_be){
this._attributes._load(_be);
},get_activeModel:function(){
return this._activeModel;
},set_numberOfHoveredRows:function(_bf){
this._numberOfHoveredRows=_bf;
},get_numberOfHoveredRows:function(){
return this._numberOfHoveredRows;
},set_groupBy:function(_c0){
this._groupBy=_c0;
},get_groupBy:function(){
return this._groupBy;
},get_contentElement:function(){
return $telerik.getElementByClassName(this.get_element(),"rsContent","div");
},showInsertFormAt:function(_c1){
var _c2={command:"Insert",appointmentID:-1,targetSlotIndex:_c1.get_index()};
this.postback(_c2);
},insertAppointment:function(_c3){
var _c4={command:"InsertAppointment",appointment:this._getSerializableAppointment(_c3),startDate:_c3.get_start().format("yyyyMMddHHmm"),endDate:_c3.get_end().format("yyyyMMddHHmm")};
this.postback(_c4);
},updateAppointment:function(_c5,_c6){
var _c7={command:"UpdateAppointment",appointmentID:_c5._internalID,appointment:this._getSerializableAppointment(_c5),startDate:_c5.get_start().format("yyyyMMddHHmm"),endDate:_c5.get_end().format("yyyyMMddHHmm"),editSeries:_c6};
this.postback(_c7);
},editAppointment:function(_c8,_c9){
var _ca={command:"Edit",appointmentID:_c8._internalID,editSeries:_c9};
this.postback(_ca);
},deleteAppointment:function(_cb,_cc){
var _cd={command:"Delete",appointmentID:_cb._internalID,editSeries:_cc};
this.postback(_cd);
},getAppointmentDomElement:function(_ce){
while(_ce&&!Sys.UI.DomElement.containsCssClass(_ce,"rsApt")){
_ce=_ce.parentNode;
}
return _ce;
},getAppointmentFromDomElement:function(_cf){
if(!_cf){
return null;
}
var _d0=this.getAppointmentDomElement(_cf);
var _d1=this.get_appointments();
for(var i=0;i<_d1.get_count();i++){
var _d3=_d1.getAppointment(i);
if(!_d3.get_element()){
continue;
}
for(var _d4=0;_d4<_d3._domElements.length;_d4++){
if(_d0.id==_d3._domElements[_d4]){
return _d3;
}
}
}
return null;
},saveClientState:function(){
return "{\"scrollTop\":"+this._scrollTop+"}";
},_getSerializableAppointment:function(_d5){
return {ID:_d5._internalID,Subject:_d5.get_subject(),RecurrenceState:_d5.get_recurrenceState(),RecurrenceParentID:_d5.get_recurrenceParentID()};
},_fireFormCreated:function(){
if(this._shouldFireFormCreated){
var _d6=this.get_element();
if(this._inlineFormDiv){
_d6=this._inlineFormDiv;
}else{
if(this._advancedFormDiv){
_d6=this._advancedFormDiv;
}
}
var _d7=new Telerik.Web.UI.SchedulerFormCreatedEventArgs(this.get_currentAppointment(),_d6);
this.raise_formCreated(_d7);
}
},_onKeyboardEvent:function(e){
if(e.keyCode==27){
if(this._dragging){
this._abortDrag(e);
}
if(this._resizingState.resizing){
this._resizingState.resizingAppointment._setDuration(this._resizingState.resizingAppointmentDuration);
this._cleanupResize();
}
}
},_updateScrollTop:function(e){
this._scrollTop=this.get_contentElement().scrollTop;
this.updateClientState();
},_onAppointmentClick:function(e){
var _db=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_db._selected){
this._editAppointmentInline(_db);
return;
}
var _dc=new Telerik.Web.UI.SchedulerAppointmentClickEventArgs(_db);
this.raise_appointmentClick(_dc);
if(this.get_readOnly()&&this.get_shouldPostbackOnClick()){
var _dd={Command:"Click",AppointmentID:_db._internalID,EditSeries:false};
this.postback(_dd);
return;
}
if(this._selectedAppointment){
this._selectedAppointment._unselect();
}
_db._select();
this._selectedAppointment=_db;
},_onAppointmentContextMenu:function(e){
var _df=this.getAppointmentFromDomElement(e.eventMapTarget);
var _e0=new Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs(_df,e);
this.raise_appointmentContextMenu(_e0);
},_onEditFormClick:function(e){
e.stopPropagation();
},_removeMonthCellHover:function(){
if(this._currentHoverCell){
Sys.UI.DomElement.removeCssClass(this._currentHoverCell,"rsAptCreate");
}
},_onMonthCellMouseOver:function(e){
if(Sys.UI.DomElement.containsCssClass(e.eventMapTarget,"rsWrap")){
this._currentHoverDiv=e.eventMapTarget;
this._currentHoverCell=e.eventMapTarget.parentNode;
Sys.UI.DomElement.addCssClass(this._currentHoverCell,"rsAptCreate");
}
},_getHourCellFromDomElement:function(_e3){
var _e4=_e3;
while(_e4.tagName.toLowerCase()!="th"){
_e4=_e4.parentNode;
}
return _e4;
},_onAllDayCellMouseOver:function(e){
if(this._dragging&&this._draggingAppointment){
e.eventMapTarget.lastChild.appendChild(this._draggingAppointment.get_element());
}
this._onRowMouseOver(e);
},_onRowMouseOver:function(e){
if(this._dragging){
return;
}
if(!this._resizingState.resizing){
this._removeRowHover();
this._currentHoverDiv=e.eventMapTarget;
this._currentHoverCell=e.eventMapTarget;
var _e7=this.get_numberOfHoveredRows();
hoveredCells=[];
hoveredCells[0]=this._currentHoverCell;
if(Sys.UI.DomElement.containsCssClass(this._currentHoverCell.parentNode,"rsAllDay")||this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView){
_e7=1;
}
for(var i=1;i<_e7;i++){
var _e9=this._getNextRowCell(hoveredCells[i-1]);
if(_e9){
hoveredCells[i]=_e9;
}else{
break;
}
}
for(var i=0;i<hoveredCells.length;i++){
Sys.UI.DomElement.addCssClass(hoveredCells[i],"rsAptCreate");
}
this._hoveredCells=hoveredCells;
}
},_getNextRowCell:function(_ea){
var _eb=_ea.parentNode;
var _ec=_eb.parentNode;
while(_ec.tagName.toLowerCase()!="table"){
_ec=_ec.parentNode;
}
var _ed=_ec.rows[_eb.rowIndex+1];
var _ee=null;
if(_ed){
var _ef=_ed.cells.length;
var _f0=_eb.cells.length;
if(_ef==_f0){
_ee=_ed.cells[_ea.cellIndex];
}else{
if(_ef<_f0){
_ee=_ed.cells[_ea.cellIndex-1];
}else{
_ee=_ed.cells[_ea.cellIndex+1];
}
}
}
return _ee;
},_onRowMouseOut:function(e){
try{
var _f2=e.rawEvent.relatedTarget?e.rawEvent.relatedTarget:e.rawEvent.toElement;
if(!_f2||!this._currentHoverCell||$telerik.isDescendant(this._currentHoverDiv,_f2)){
return;
}
this._removeRowHover();
}
catch(ex){
return;
}
},_removeRowHover:function(){
if(!this._hoveredCells){
return;
}
this._currentHoverCell=null;
for(var i=0;i<this._hoveredCells.length;i++){
Sys.UI.DomElement.removeCssClass(this._hoveredCells[i],"rsAptCreate");
}
if(this._currentHoverCell){
Sys.UI.DomElement.removeCssClass(this._currentHoverCell,"rsAptCreate");
}
},_stopEventPropagation:function(e){
e.stopPropagation();
},_onResizeGripMouseDown:function(e){
if(this.get_readOnly()){
return;
}
this._resizingState.resizingElement=this.getAppointmentDomElement(e.eventMapTarget);
var _f6=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _f7=(_f6.get_allowEdit()!=null)?_f6.get_allowEdit():this.get_allowEdit();
if(!_f7){
return;
}
var _f8=new Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs(_f6);
this.raise_appointmentResizeStart(_f8);
if(_f8.get_cancel()==false){
this._resizingState.resizing=true;
this._resizingState.resizingAppointment=_f6;
this._resizingState.resizingAppointmentDuration=_f6._getDuration();
$addHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$addHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$addHandler(document,"selectstart",this._onSelectStartDelegate);
}
},_onResizeGripMouseMove:function(e){
var _fa=this._resizingState.resizingElement;
if(!_fa){
return;
}
var _fb=_fa.parentNode.parentNode;
var _fc=10;
var _fd=this._getCellFromCoordinates(e.clientX,e.clientY-_fc);
if(!_fd){
return;
}
var _fe=this._activeModel.getTimeSlotFromDomElement(_fd);
var _ff=new Telerik.Web.UI.SchedulerAppointmentResizingEventArgs(this._resizingState.resizingAppointment,_fe);
this.raise_appointmentResizing(_ff);
if(_ff.get_cancel()){
return;
}
var _100=_fb.offsetHeight;
var _101=_fd.parentNode.rowIndex-_fb.parentNode.rowIndex;
var _102=Math.max(1,(_101+1))*_100;
if($telerik.isIE&&$telerik.quirksMode){
var _103=_fa.firstChild;
_103.style.height="";
}
var _104=_fb.parentNode.parentNode.parentNode;
var _105=_fd.parentNode.parentNode.parentNode;
if(_104!=_105){
return;
}
var _106=parseInt(_fa.style.paddingBottom);
_106=isNaN(_106)?0:_106;
var _102=_102-_106;
if($telerik.isIE&&$telerik.quirksMode){
_102-=$telerik.getBorderBox(_fb).vertical*2;
}
_fa.style.height=_102+"px";
if($telerik.isIE&&$telerik.quirksMode&&_fa._initialHeightInRows){
Telerik.Web.UI.RadScheduler._adjustSingleAppointmentHeight(_fa,_fa._initialHeightInRows);
}
Telerik.Web.UI.RadScheduler._fixIEBottom(this._resizingState.resizingElement);
this._keepElementInView(this._resizingState.resizingElement,true);
},_onSelectStart:function(e){
return false;
},_findResizeTargetSlot:function(_108){
var _109=_108.parentNode.parentNode.offsetHeight;
var _10a=Math.ceil(_108.offsetHeight/_109);
var _10b=_108.parentNode.parentNode;
var _10c=_10b.parentNode;
var _10d=_10c.rowIndex+_10a-1;
_10d=Math.min(_10d,_10c.parentNode.rows.length-1);
var _10e=_10c.parentNode.rows[_10d];
var _10f=_10e.cells[_10b.cellIndex];
return this._activeModel.getTimeSlotFromDomElement(_10f);
},_onResizeGripMouseUp:function(e){
if(!this._resizingState.resizingElement){
return;
}
var _111=this._findResizeTargetSlot(this._resizingState.resizingElement);
var _112=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _113=this._activeModel.getTimeSlotFromDomElement(_112.get_element());
var _114=_111.get_startTime();
Telerik.Web.UI.RadScheduler._incrementTime(_114,0,this.get_minutesPerRow());
if(_114.getTime()==_112.get_end().getTime()){
this._cleanupResize();
return;
}
var args={OnConfirm:this._onAppointmentResizeCallback,OnAbort:this._onAppointmentResizeAbortCallback,Scheduler:this,Appointment:_112,SourceSlotIndex:_113.get_index(),TargetSlotIndex:_111.get_index(),UpdatedEndDate:_114,ResizingAppointmentDuration:this._resizingState.resizingAppointmentDuration,CallbackIsCalledFromDialog:true};
if(_112._recurrenceState==1||_112._recurrenceState==2){
var _116=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Resize);
this.raise_recurrenceActionDialogShowing(_116);
if(_116.get_cancel()){
var _117=_116.get_editSeries();
if(_117!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(_117,args);
}else{
this._onAppointmentResizeAbortCallback(args);
}
}else{
this._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Resize,args);
}
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(false,args);
}
e.stopPropagation();
this._cleanupResize();
},_cleanupResize:function(){
this._resizingState.resizing=false;
this._resizingState.resizingElement=null;
this._resizingState.resizingAppointment=null;
this._resizingState.resizingAppointmentDuration=null;
$removeHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$removeHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$removeHandler(document,"selectstart",this._onSelectStartDelegate);
},_onAppointmentResizeCallback:function(_118,args){
if(args.CallbackIsCalledFromDialog){
var _11a=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Resize,_118);
args.Scheduler.raise_recurrenceActionDialogClosed(_11a);
}
var _11b=new Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs(args.Appointment,args.UpdatedEndDate,_118);
args.Scheduler.raise_appointmentResizeEnd(_11b);
if(_11b.get_cancel()==false){
var _11c={Command:"Resize",AppointmentID:args.Appointment._internalID,SourceSlotIndex:args.SourceSlotIndex,TargetSlotIndex:args.TargetSlotIndex,EditSeries:_118};
args.Scheduler.postback(_11c);
}else{
args.Appointment._setDuration(args.ResizingAppointmentDuration);
}
},_onAppointmentResizeAbortCallback:function(args){
args.Appointment._setDuration(args.ResizingAppointmentDuration);
},_onResizeGripMouseClick:function(e){
e.stopPropagation();
},_onResizeGripMouseOver:function(e){
e.target.style.cursor="s-resize";
e.stopPropagation();
},_initializeModelTables:function(){
this._modelTables=new Array();
var _120=this.get_element().getElementsByTagName("table");
for(var i=0;i<_120.length;i++){
var _122=_120[i];
if(Sys.UI.DomElement.containsCssClass(_122,"rsContentTable")||Sys.UI.DomElement.containsCssClass(_122,"rsAllDayTable")||Sys.UI.DomElement.containsCssClass(_122,"rsTimelineTable")){
_122.targetRect=$telerik.getBounds(_122);
var _123=this.get_contentElement();
if(_123&&$telerik.isDescendant(_123,_122)){
this._compensateScrollOffset(_123,_122);
}
var _124=_122.rows[0].cells[0];
_122.cellWidth=_122.targetRect.width/_122.rows[0].cells.length;
_122.cellHeight=_124.offsetHeight;
Array.add(this._modelTables,_122);
}
}
return this._modelTables;
},_compensateScrollOffset:function(_125,_126){
var _127=$telerik.getScrollOffset(_125,false);
_126.targetRect.x+=_127.x;
_126.targetRect.y+=_127.y;
if($telerik.isSafari){
_126.targetRect.x+=_127.x;
_126.targetRect.y+=_127.y;
}
},_getCellFromCoordinates:function(_128,_129){
if(!this.get_element()){
return;
}
var _12a=this._modelTables;
var _12b=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _12c=$telerik.getScrollOffset(_12b,true);
for(var i=0,_12e=_12a.length;i<_12e;i++){
var x=_128+_12c.x;
var y=_129+_12c.y;
var _131=_12a[i];
var _132=_131.targetRect;
var _133=_132.y+_132.height;
var _134=_132.x+_132.width;
if(x>=_132.x&&x<=_134&&y>=_132.y&&y<=_133){
var _135=parseInt((y-_132.y)/_131.cellHeight);
_135=Math.min(_131.rows.length-1,Math.max(0,_135));
var _136=parseInt((x-_132.x)/_131.cellWidth);
_136=Math.min(_131.rows[_135].cells.length-1,Math.max(0,_136));
return _131.rows[_135].cells[_136];
}
}
return null;
},_shouldStartDrag:function(_137){
if(!this._initialDragAppointment||!this._initialDragMousePos){
return false;
}
if(Math.abs(this._initialDragMousePos.x-_137.x)>4||Math.abs(this._initialDragMousePos.y-_137.y)>4){
return true;
}
},_onDocumentMouseMove:function(e){
var _139=this._getMousePosition(e);
if(!this._dragging&&this._shouldStartDrag(_139)){
this._startDrag(e);
}
if(!this._dragging||!this._draggingAppointment){
return;
}
this._clearSelection();
var _13a=this._draggingAppointment.get_element();
var _13b=this._getCellFromCoordinates(e.clientX,e.clientY-this._draggingOffset);
if(!_13b||_13b.firstChild==_13a.parentNode){
return;
}
Sys.UI.DomElement.removeCssClass(_13a.parentNode,this._styles.dragTarget);
if(_13b.firstChild.nodeType==3){
_13b.removeChild(_13b.firstChild);
var wrap=_13a.parentNode.cloneNode(false);
wrap.style.zIndex=_13b.parentNode.parentNode.rows.length-_13b.parentNode.rowIndex;
if($telerik.isFirefox){
wrap.style.height=_13b.clientHeight+"px";
}
_13b.appendChild(wrap);
}
if(this.get_selectedView()!=Telerik.Web.UI.SchedulerViewType.MonthView){
_13b.firstChild.appendChild(_13a);
}else{
if(_13b.childNodes[1]){
_13b.childNodes[1].appendChild(_13a);
}
}
Sys.UI.DomElement.addCssClass(_13a.parentNode,this._styles.dragTarget);
var _13d=this._activeModel.getTimeSlotFromDomElement(_13b);
var args=new Telerik.Web.UI.SchedulerAppointmentMovingEventArgs(this._draggingAppointment,_13d);
this.raiseEvent("appointmentMoving",args);
if(args.get_cancel()){
this._abortDrag(e);
}else{
if(!_13d.get_isAllDay()){
this._keepElementInView(_13a);
}
}
return;
},_keepElementInView:function(_13f,_140){
var _141=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _142=this._getRelativeOffsetTop(_13f,_141);
var _143=_13f.offsetHeight;
var _144=_142+_143;
var _145=_141.clientHeight+_141.scrollTop;
var _146=_13f.parentNode.parentNode.offsetHeight;
if(!_140&&_142<_141.scrollTop){
_141.scrollTop=_142;
}
if(_144>_145){
var _147=_141.scrollTop+(_144-_145);
if((_141.clientHeight+_147)>_141.scrollHeight){
return;
}
if(!_140&&_147>_142){
_147=_142;
}
_141.scrollTop=_147;
}
if(_140&&(_144-_146)<_141.scrollTop){
_141.scrollTop=_144-_146;
}
},_getRelativeOffsetTop:function(_148,_149){
var _14a=_148.offsetParent;
var _14b=_148.offsetTop;
while(_14a!=_149){
_14b+=_14a.offsetTop;
if(!_14a.offsetParent){
break;
}
_14a=_14a.offsetParent;
}
return _14b;
},_getMousePosition:function(e){
var _14d=$telerik.getScrollOffset(document.body,true);
var _14e=e.clientX;
var _14f=e.clientY;
_14e+=_14d.x;
_14f+=_14d.y;
return {x:_14e,y:_14f};
},_onAppointmentMouseDown:function(e){
if(this.get_readOnly()){
return;
}
var _151=this.getAppointmentFromDomElement(e.eventMapTarget);
var _152=(_151.get_allowEdit()!=null)?_151.get_allowEdit():this.get_allowEdit();
if(!_152){
return;
}
this._initialDragMousePos=this._getMousePosition(e);
this._initialDragAppointment=_151;
$addHandler(document,"selectstart",this._onSelectStartDelegate);
$addHandler(document,"mouseup",this._onDocMouseUpDelegate);
$addHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=true;
},_startDrag:function(e){
var _154=this._initialDragAppointment;
var _155=this._getCellFromCoordinates(e.clientX,e.clientY);
if(!_155){
return;
}
var _156=new Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs(_154);
this.raiseEvent("appointmentMoveStart",_156);
if(_156.get_cancel()){
return;
}
this._draggingAppointment=_154;
this._dragging=true;
var _157=this._draggingAppointment.get_element();
var _158=$telerik.getLocation(_157);
if($telerik.isFirefox||$telerik.isSafari){
var _159=$telerik.getScrollOffset(_157,true);
_158.x-=_159.x;
_158.y-=_159.y;
if($telerik.isFirefox){
_158.x+=document.body.parentNode.scrollLeft;
_158.y+=document.body.parentNode.scrollTop;
}else{
_158.x+=document.body.scrollLeft;
_158.y+=document.body.scrollTop;
}
}
var _15a=$telerik.getLocation(_155);
var _15b=e.clientY-_158.y;
var _15c=e.clientY-_15a.y;
this._draggingOffset=_15b-_15c;
if($telerik.isFirefox&&document.compatMode=="BackCompat"){
this._draggingOffset=0;
}
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView||this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.TimelineView){
this._draggingOffset=0;
}
_154._startDrag();
},_endDrag:function(e){
this._finishDrag(e,false);
},_onDocMouseUp:function(e){
this._finishDrag(e,false);
},_abortDrag:function(e){
this._finishDrag(e,true);
},_finishDrag:function(e,_161){
if(this._dragHandlersAttached){
$removeHandler(document,"selectstart",this._onSelectStartDelegate);
$removeHandler(document,"mouseup",this._onDocMouseUpDelegate);
$removeHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=false;
}
if(this._dragging){
var _162=this._draggingAppointment.get_element();
if(!_161&&_162.parentNode&&_162.parentNode.parentNode){
var _163=_162.parentNode.parentNode;
this._draggingAppointment._endDrag(_163);
}else{
this._draggingAppointment._abortDrag();
}
this._draggingAppointment=null;
this._dragging=false;
Sys.UI.DomElement.removeCssClass(_162.parentNode,this._styles.dragTarget);
e.preventDefault();
e.stopPropagation();
}
},_onAppointmentDoubleClick:function(e){
if(this._resizingState.resizing){
this._resizingState.resizing=false;
e.stopPropagation();
return;
}
this._clearSelection();
var _165=this.getAppointmentFromDomElement(e.eventMapTarget);
var _166=new Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs(_165);
this.raise_appointmentDoubleClick(_166);
this._editAppointmentInline(_165);
e.stopPropagation();
},_editAppointmentInline:function(_167){
if(this.get_readOnly()){
return;
}
if(_167){
var _168=(_167.get_allowEdit()!=null)?_167.get_allowEdit():this.get_allowEdit();
if(!_168){
return;
}
var args={OnConfirm:this._onAppointmentEditCallback,Scheduler:this,Appointment:_167,CallbackIsCalledFromDialog:true};
if(_167._recurrenceState==1||_167._recurrenceState==2||_167._recurrenceState==3){
var _16a=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Edit);
this.raise_recurrenceActionDialogShowing(_16a);
if(_16a.get_cancel()){
var _16b=_16a.get_editSeries();
if(_16b!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(_16b,args);
}
}else{
this._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Edit,args);
}
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(false,args);
}
}
},_onAppointmentEditCallback:function(_16c,args){
if(args.CallbackIsCalledFromDialog){
var _16e=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Edit,_16c);
args.Scheduler.raise_recurrenceActionDialogClosed(_16e);
}
if(!this._editing){
var _16f=new Telerik.Web.UI.SchedulerAppointmentEditingEventArgs(args.Appointment,_16c);
args.Scheduler.raise_appointmentEditing(_16f);
if(_16f.get_cancel()==false){
this._editing=true;
var _170={Command:"Edit",AppointmentID:args.Appointment._internalID,EditSeries:_16c};
args.Scheduler.postback(_170);
}
}
},_clearSelection:function(){
if(document.selection&&document.selection.empty){
document.selection.empty();
}else{
if(window.getSelection&&window.getSelection().removeAllRanges){
window.getSelection().removeAllRanges();
}
}
},_onShowMoreClick:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _173={Command:"SwitchToSelectedDay",SourceSlotIndex:slot.get_index()};
this.postback(_173);
},_onAppointmentMouseOver:function(e){
if(this._resizingState.resizing||this._dragging){
e.stopPropagation();
return;
}
var _175=this.getAppointmentDomElement(e.eventMapTarget);
var _176=this.getAppointmentFromDomElement(_175);
var _177=(_176.get_allowDelete()!=null)?_176.get_allowDelete():this.get_allowDelete();
if(!_177){
return;
}
this._hoveredAppointmentElement=_175;
var _178=$telerik.getElementByClassName(_175,"rsAptDelete","a");
if(_178){
_178.style.visibility="visible";
}
},_onAppointmentMouseOut:function(e){
var _17a=e.rawEvent.relatedTarget?e.rawEvent.relatedTarget:e.rawEvent.toElement;
if(!_17a||$telerik.isDescendant(this._hoveredAppointmentElement,_17a)){
return;
}else{
var _17b=this.getAppointmentDomElement(e.eventMapTarget);
var _17c=$telerik.getElementByClassName(_17b,"rsAptDelete","a");
if(_17c){
_17c.style.visibility="hidden";
}
}
},_getCellCoordinates:function(_17d){
while(_17d&&(_17d.tagName.toLowerCase()!="td")){
_17d=_17d.parentNode;
}
if(_17d){
var _17e=_17d.cellIndex;
var _17f=_17d.parentNode.rowIndex;
return {cellIndex:_17e,rowIndex:_17f};
}
return -1;
},_getCellTimeFromDomElement:function(_180){
var _181=new Date(this.get_firstDayStart().getTime());
var _182=this._getCellCoordinates(_180);
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView){
var _183=24*7*_182.rowIndex;
var _184=24*_182.cellIndex;
Telerik.Web.UI.RadScheduler._incrementTime(_181,_183+_184);
}else{
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.ResourceView){
var _185=_182.rowIndex*this.get_minutesPerRow();
Telerik.Web.UI.RadScheduler._incrementTime(_181,0,_185);
}else{
var _185=_182.rowIndex*this.get_minutesPerRow();
Telerik.Web.UI.RadScheduler._incrementTime(_181,24*_182.cellIndex,_185);
}
}
return _181;
},_onCellClick:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _188=new Telerik.Web.UI.SchedulerTimeSlotClickEventArgs(slot.get_startTime(),slot);
this.raise_timeSlotClick(_188);
},_onCellContextMenu:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _18b=new Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs(slot.get_startTime(),slot.get_isAllDay(),e,slot);
this.raise_timeSlotContextMenu(_18b);
},_onCellDoubleClick:function(e){
if(!this.get_readOnly()&&this.get_allowInsert()){
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _18e=new Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs(slot.get_startTime(),slot.get_isAllDay(),slot);
this.raise_appointmentInserting(_18e);
if(_18e.get_cancel()==false){
var _18f={Command:"Insert",AppointmentID:-1,TargetSlotIndex:slot.get_index()};
this.postback(_18f);
}
}
e.stopPropagation();
},_onAppointmentDeleteClick:function(e){
if(!this.get_readOnly()){
var _191=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_191){
var args={OnConfirm:this._onAppointmentDeleteCallback,Scheduler:this,Appointment:_191,CallbackIsCalledFromDialog:true};
if(_191._recurrenceState==1||_191._recurrenceState==2||_191._recurrenceState==3){
var _193=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Delete);
this.raise_recurrenceActionDialogShowing(_193);
if(_193.get_cancel()){
var _194=_193.get_editSeries();
if(_194!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(_194,args);
}
}else{
this._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Delete,args);
}
}else{
if(this.get_displayDeleteConfirmation()){
this._recurrenceActionDialog.ConfirmDelete(args);
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(false,args);
}
}
}
}
e.stopPropagation();
e.preventDefault();
},_onAppointmentDeleteCallback:function(_195,args){
if(args.CallbackIsCalledFromDialog){
var _197=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Delete,_195);
args.Scheduler.raise_recurrenceActionDialogClosed(_197);
}
var _198=new Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs(args.Appointment,_195);
args.Scheduler.raise_appointmentDeleting(_198);
if(_198.get_cancel()==false){
var _199={Command:"Delete",AppointmentID:args.Appointment._internalID,EditSeries:_195};
args.Scheduler.postback(_199);
}
},_onPreviousDayClick:function(e){
var _19b=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_19b){
var _19c={Command:"GoToPrevious",AppointmentID:_19b._internalID};
this.postback(_19c);
}
e.stopPropagation();
e.preventDefault();
},_onNextDayClick:function(e){
var _19e=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_19e){
var _19f={Command:"GoToNext",AppointmentID:_19e._internalID};
this.postback(_19f);
}
e.stopPropagation();
e.preventDefault();
},_onDayViewTabClick:function(e){
var _1a1={Command:"SwitchToDayView"};
this.postback(_1a1);
e.stopPropagation();
e.preventDefault();
},_onWeekViewTabClick:function(e){
var _1a3={Command:"SwitchToWeekView"};
this.postback(_1a3);
e.stopPropagation();
e.preventDefault();
},_onMonthViewTabClick:function(e){
var _1a5={Command:"SwitchToMonthView"};
this.postback(_1a5);
e.stopPropagation();
e.preventDefault();
},_onTimelineViewTabClick:function(e){
var _1a7={Command:"SwitchToTimelineView"};
this.postback(_1a7);
e.stopPropagation();
e.preventDefault();
},_onMultiDayViewTabClick:function(e){
var _1a9={Command:"SwitchToMultiDayView"};
this.postback(_1a9);
e.stopPropagation();
e.preventDefault();
},_onPreviousSchedulerDayClick:function(e){
var _1ab={Command:"NavigateToPreviousPeriod"};
this.postback(_1ab);
e.stopPropagation();
e.preventDefault();
},_onNextSchedulerDayClick:function(e){
var _1ad={Command:"NavigateToNextPeriod"};
this.postback(_1ad);
e.stopPropagation();
e.preventDefault();
},_onTodayClick:function(e){
var _1af={Command:"GoToToday"};
this.postback(_1af);
e.stopPropagation();
e.preventDefault();
},_onFullTimeLinkClick:function(e){
var _1b1={Command:"SwitchFullTime"};
this.postback(_1b1);
e.stopPropagation();
e.preventDefault();
},postback:function(args){
this._updateScrollTop();
var _1b3=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _1b4=this.get_postBackReference().replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(args));
eval(_1b4);
},_getElementIndex:function(_1b5,_1b6){
if(!_1b5){
return;
}
for(var i=0;i<_1b5.length;i++){
if(_1b5[i]===_1b6){
return i;
}
}
return -1;
},add_appointmentClick:function(_1b8){
this.get_events().addHandler("AppointmentClick",_1b8);
},remove_appointmentClick:function(_1b9){
this.get_events().removeHandler("AppointmentClick",_1b9);
},raise_appointmentClick:function(args){
this.raiseEvent("AppointmentClick",args);
},add_appointmentInserting:function(_1bb){
this.get_events().addHandler("AppointmentInserting",_1bb);
},remove_appointmentInserting:function(_1bc){
this.get_events().removeHandler("AppointmentInserting",_1bc);
},raise_appointmentInserting:function(_1bd){
this.raiseEvent("AppointmentInserting",_1bd);
},add_appointmentDoubleClick:function(_1be){
this.get_events().addHandler("AppointmentDoubleClick",_1be);
},remove_appointmentDoubleClick:function(_1bf){
this.get_events().removeHandler("AppointmentDoubleClick",_1bf);
},raise_appointmentDoubleClick:function(_1c0){
this.raiseEvent("AppointmentDoubleClick",_1c0);
},add_appointmentResizeStart:function(_1c1){
this.get_events().addHandler("AppointmentResizeStart",_1c1);
},remove_appointmentResizeStart:function(_1c2){
this.get_events().removeHandler("AppointmentResizeStart",_1c2);
},raise_appointmentResizeStart:function(args){
this.raiseEvent("AppointmentResizeStart",args);
},add_appointmentResizeEnd:function(_1c4){
this.get_events().addHandler("AppointmentResizeEnd",_1c4);
},remove_appointmentResizeEnd:function(_1c5){
this.get_events().removeHandler("AppointmentResizeEnd",_1c5);
},raise_appointmentResizeEnd:function(args){
this.raiseEvent("AppointmentResizeEnd",args);
},add_appointmentResizing:function(_1c7){
this.get_events().addHandler("AppointmentResizing",_1c7);
},remove_appointmentResizing:function(_1c8){
this.get_events().removeHandler("AppointmentResizing",_1c8);
},raise_appointmentResizing:function(args){
this.raiseEvent("AppointmentResizing",args);
},add_appointmentDeleting:function(_1ca){
this.get_events().addHandler("AppointmentDeleting",_1ca);
},remove_appointmentDeleting:function(_1cb){
this.get_events().removeHandler("AppointmentDeleting",_1cb);
},raise_appointmentDeleting:function(args){
this.raiseEvent("AppointmentDeleting",args);
},add_timeSlotClick:function(_1cd){
this.get_events().addHandler("TimeSlotClick",_1cd);
},remove_timeSlotClick:function(_1ce){
this.get_events().removeHandler("TimeSlotClick",_1ce);
},raise_timeSlotClick:function(args){
this.raiseEvent("TimeSlotClick",args);
},add_appointmentEditing:function(_1d0){
this.get_events().addHandler("AppointmentEditing",_1d0);
},remove_appointmentEditing:function(_1d1){
this.get_events().removeHandler("AppointmentEditing",_1d1);
},raise_appointmentEditing:function(args){
this.raiseEvent("AppointmentEditing",args);
},add_appointmentMoveStart:function(_1d3){
this.get_events().addHandler("appointmentMoveStart",_1d3);
},remove_appointmentMoveStart:function(_1d4){
this.get_events().removeHandler("appointmentMoveStart",_1d4);
},add_appointmentMoving:function(_1d5){
this.get_events().addHandler("appointmentMoving",_1d5);
},remove_appointmentMoving:function(_1d6){
this.get_events().removeHandler("appointmentMoving",_1d6);
},add_appointmentMoveEnd:function(_1d7){
this.get_events().addHandler("appointmentMoveEnd",_1d7);
},remove_appointmentMoveEnd:function(_1d8){
this.get_events().removeHandler("appointmentMoveEnd",_1d8);
},add_recurrenceActionDialogShowing:function(_1d9){
this.get_events().addHandler("RecurrenceActionDialogShowing",_1d9);
},remove_recurrenceActionDialogShowing:function(_1da){
this.get_events().removeHandler("RecurrenceActionDialogShowing",_1da);
},raise_recurrenceActionDialogShowing:function(args){
this.raiseEvent("RecurrenceActionDialogShowing",args);
},add_recurrenceActionDialogClosed:function(_1dc){
this.get_events().addHandler("RecurrenceActionDialogClosed",_1dc);
},remove_recurrenceActionDialogClosed:function(_1dd){
this.get_events().removeHandler("RecurrenceActionDialogClosed",_1dd);
},raise_recurrenceActionDialogClosed:function(args){
this.raiseEvent("RecurrenceActionDialogClosed",args);
},add_formCreated:function(_1df){
this.get_events().addHandler("FormCreated",_1df);
},remove_formCreated:function(_1e0){
this.get_events().removeHandler("FormCreated",_1e0);
},raise_formCreated:function(args){
this.raiseEvent("FormCreated",args);
},add_appointmentContextMenu:function(_1e2){
this.get_events().addHandler("AppointmentContextMenu",_1e2);
},remove_appointmentContextMenu:function(_1e3){
this.get_events().removeHandler("AppointmentContextMenu",_1e3);
},raise_appointmentContextMenu:function(args){
this.raiseEvent("AppointmentContextMenu",args);
},add_timeSlotContextMenu:function(_1e5){
this.get_events().addHandler("TimeSlotContextMenu",_1e5);
},remove_timeSlotContextMenu:function(_1e6){
this.get_events().removeHandler("TimeSlotContextMenu",_1e6);
},raise_timeSlotContextMenu:function(args){
this.raiseEvent("TimeSlotContextMenu",args);
}};
Telerik.Web.UI.RadScheduler.registerClass("Telerik.Web.UI.RadScheduler",Telerik.Web.UI.RadWebControl);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RecurrenceAction=function(){
};
Telerik.Web.UI.RecurrenceAction.prototype={Edit:1,Delete:2,Resize:3,Move:4};
Telerik.Web.UI.RecurrenceAction.registerEnum("Telerik.Web.UI.RecurrenceAction");
Telerik.Web.UI.RecurrenceActionDialog=function(_1e8){
this._schedulerDomElement=_1e8.get_element();
this._scheduler=_1e8;
this._recurrenceDialogWrapper=null;
this._args=null;
this._btnOk=null;
this._btnCancel=null;
};
Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton=function(id,name,_1eb,_1ec){
var _1ed;
if($telerik.isIE){
var html="<input type=\"radio\" ";
html+="id=\""+id+"\" ";
html+="name=\""+name+"\" ";
html+="value=\""+_1eb+"\" ";
if(_1ec){
html+="checked ";
}
html+="/>";
_1ed=document.createElement(html);
}else{
_1ed=document.createElement("input");
_1ed.id=id;
_1ed.type="radio";
_1ed.name=name;
_1ed.value=_1eb;
_1ed.checked=_1ec;
}
return _1ed;
};
Telerik.Web.UI.RecurrenceActionDialog.prototype={ConfirmRecurrenceAction:function(_1ef,args){
localization=this._scheduler.get_localization();
var _1f1;
var _1f2;
var _1f3;
switch(_1ef){
case Telerik.Web.UI.RecurrenceAction.Edit:
_1f1=localization.ConfirmRecurrenceEditTitle;
_1f2=localization.ConfirmRecurrenceEditOccurrence;
_1f3=localization.ConfirmRecurrenceEditSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Resize:
_1f1=localization.ConfirmRecurrenceResizeTitle;
_1f2=localization.ConfirmRecurrenceResizeOccurrence;
_1f3=localization.ConfirmRecurrenceResizeSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Delete:
_1f1=localization.ConfirmRecurrenceDeleteTitle;
_1f2=localization.ConfirmRecurrenceDeleteOccurrence;
_1f3=localization.ConfirmRecurrenceDeleteSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Move:
_1f1=localization.ConfirmRecurrenceMoveTitle;
_1f2=localization.ConfirmRecurrenceMoveOccurrence;
_1f3=localization.ConfirmRecurrenceMoveSeries;
break;
}
var d=document;
this._args=args;
var _1f5=this._createDialog(_1f1);
if(!_1f5){
return;
}
var _1f6=_1f5.appendChild(d.createElement("div"));
var _1f7=_1f6.appendChild(Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton("choiceOccurrenceSpan_0","choiceOccurrenceSpan","OpenOccurrence",true));
var _1f8=_1f6.appendChild(d.createElement("label"));
_1f8.htmlFor=_1f7.id;
_1f8.appendChild(d.createTextNode(_1f2));
var _1f9=_1f5.appendChild(d.createElement("div"));
var _1fa=_1f9.appendChild(Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton("choiceOccurrenceSpan_1","choiceOccurrenceSpan","OpenSeries",false));
this._editSeriesRadio=_1fa;
var _1fb=_1f9.appendChild(d.createElement("label"));
_1fb.htmlFor=_1fa.id;
_1fb.appendChild(d.createTextNode(_1f3));
this._createButtons(_1f5,this._confirmRecurrenceActionOkClick,this._removeConfirmAction);
},_confirmRecurrenceActionOkClick:function(e){
var _1fd=this._editSeriesRadio.checked;
this._removeConfirmAction(e);
this._args.OnConfirm(_1fd,this._args);
e.preventDefault();
e.stopPropagation();
},ConfirmDelete:function(args){
localization=this._scheduler.get_localization();
var _1ff=localization.ConfirmDeleteTitle;
var _200=localization.ConfirmDeleteText;
var d=document;
this._args=args;
var _202=this._createDialog(_1ff);
if(!_202){
return;
}
var h2=_202.appendChild(d.createElement("h2"));
h2.appendChild(d.createTextNode(_200));
this._createButtons(_202,this._confirmDeleteOkClick,this._removeConfirmAction);
},_confirmDeleteOkClick:function(e){
var _205=false;
this._removeConfirmAction(e);
this._args.OnConfirm(_205,this._args);
e.preventDefault();
e.stopPropagation();
},_removeConfirmAction:function(e){
this.dispose();
if(this._args.OnAbort){
this._args.OnAbort(this._args);
}
e.preventDefault();
e.stopPropagation();
},_createDialog:function(_207){
var d=document;
if($telerik.getElementByClassName(this._schedulerDomElement,"rsModalContainer","div")){
return;
}
this._recurrenceDialogWrapper=d.createElement("div");
this._recurrenceDialogWrapper.style.position="relative";
this._recurrenceDialogWrapper.style.width="100%";
this._recurrenceDialogWrapper.style.zIndex=10000;
this._schedulerDomElement.insertBefore(this._recurrenceDialogWrapper,this._schedulerDomElement.childNodes[0]);
var _209=this._recurrenceDialogWrapper.appendChild(d.createElement("div"));
_209.className="rsModalContainer";
_209.onselectstart=function(){
return false;
};
_209.style.height=this._schedulerDomElement.offsetHeight+"px";
$telerik.setOpacity(_209,0.4);
var _20a=this._recurrenceDialogWrapper.appendChild(d.createElement("div"));
_20a.className="rsConfirmation";
_20a.style.top=(this._schedulerDomElement.offsetHeight-_20a.offsetHeight)/2+"px";
_20a.style.left=(this._schedulerDomElement.offsetWidth-_20a.offsetWidth)/2+"px";
_20a.style.display="block";
var h1=_20a.appendChild(d.createElement("h1"));
h1.appendChild(d.createTextNode(_207));
return _20a;
},_createButtons:function(_20c,_20d,_20e){
localization=this._scheduler.get_localization();
var OK=localization.ConfirmOK;
var _210=localization.ConfirmCancel;
var d=document;
var _212=_20c.appendChild(d.createElement("div"));
_212.className="rsButtonContainer";
this._btnOk=_212.appendChild(d.createElement("a"));
this._btnOk.className="rsDialogButton";
this._btnOk.appendChild(d.createTextNode(OK));
this._btnOk.href="#";
this._btnOk.focus();
$addHandlers(this._btnOk,{"click":_20d},this);
this._btnCancel=_212.appendChild(d.createElement("a"));
this._btnCancel.className="rsDialogButton";
this._btnCancel.appendChild(d.createTextNode(_210));
this._btnCancel.href="#";
$addHandlers(this._btnCancel,{"click":_20e},this);
},dispose:function(){
if(this._btnOk){
$clearHandlers(this._btnOk);
}
if(this._btnCancel){
$clearHandlers(this._btnCancel);
}
if(this._recurrenceDialogWrapper&&this._recurrenceDialogWrapper.parentNode){
this._recurrenceDialogWrapper.parentNode.removeChild(this._recurrenceDialogWrapper);
}
}};
Telerik.Web.UI.RecurrenceActionDialog.registerClass("Telerik.Web.UI.RecurrenceActionDialog",null,Sys.IDisposable);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerResource=function(_213){
this._key=_213.key;
this._type=_213.type;
this._text=_213.text;
this._internalKey=_213.internalKey;
this._available=_213.available;
this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection(this);
if(typeof (_213.attributes)!="undefined"){
this._attributes._load(_213.attributes);
}
};
Telerik.Web.UI.SchedulerResource.prototype={get_key:function(){
return this._key;
},get_type:function(){
return this._type;
},get_text:function(){
return this._text;
},get_available:function(){
return this._available;
},_getInternalKey:function(){
return this._internalKey;
},get_attributes:function(){
return this._attributes;
}};
Telerik.Web.UI.SchedulerResource.registerClass("Telerik.Web.UI.SchedulerResource");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerResourceCollection=function(){
this._array=new Array();
};
Telerik.Web.UI.SchedulerResourceCollection.prototype={add:function(item){
var _215=this._array.length;
this.insert(_215,item);
},insert:function(_216,item){
Array.insert(this._array,_216,item);
},remove:function(item){
Array.remove(this._array,item);
},removeAt:function(_219){
var item=this.getAppointment(_219);
if(item){
this.remove(item);
}
},clear:function(){
this._array=new Array();
},get_count:function(){
return this._array.length;
},forEach:function(_21b){
for(var i=0,_21d=this.get_count();i<_21d;i++){
_21b(this.getResource(i));
}
},getResource:function(_21e){
return this._array[_21e];
},getResourcesByType:function(type){
var _220=new Telerik.Web.UI.SchedulerResourceCollection();
this.forEach(function(_221){
if(_221.get_type()==type){
_220.add(_221);
}
});
return _220;
}};
Telerik.Web.UI.SchedulerResourceCollection.registerClass("Telerik.Web.UI.SchedulerResourceCollection");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAttributeCollection=function(){
this._data={};
this._keys=[];
};
Telerik.Web.UI.SchedulerAttributeCollection.prototype={getAttribute:function(key){
return this._data[key];
},setAttribute:function(key,_224){
this._add(key,_224);
var _225={};
_225[key]=_224;
},_add:function(key,_227){
if(Array.indexOf(this._keys,key)<0){
Array.add(this._keys,key);
}
this._data[key]=_227;
},removeAttribute:function(key){
Array.remove(this._keys,key);
delete this._data[key];
},_load:function(json){
for(var key in json){
this._add(key,json[key]);
}
},get_count:function(){
return this._keys.length;
}};
Telerik.Web.UI.SchedulerAttributeCollection.registerClass("Telerik.Web.UI.SchedulerAttributeCollection");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.ISchedulerModel=function(){
};
Telerik.Web.UI.ISchedulerModel.prototype={getTimeSlotFromDomElement:function(_22b){
throw Error.notImplemented();
}};
Telerik.Web.UI.ISchedulerModel.registerInterface("Telerik.Web.UI.ISchedulerModel");
Telerik.Web.UI.ISchedulerTimeSlot=function(){
};
Telerik.Web.UI.ISchedulerTimeSlot.prototype={get_index:function(){
throw Error.notImplemented();
},get_isAllDay:function(){
throw Error.notImplemented();
},get_startTime:function(){
throw Error.notImplemented();
}};
Telerik.Web.UI.ISchedulerTimeSlot.registerInterface("Telerik.Web.UI.ISchedulerTimeSlot");

