Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointment=function(_1,_2,_3){
this._id=_1.id;
this._subject=_1.subject;
this._start=_1.start;
this._end=_1.end;
this._tooltip=_1.toolTip;
this._internalID=_1.internalID;
this._visible=_1.visible;
this._recurrenceState=_1.recurrenceState;
this._recurrenceParentID=_1.recurrenceParentID;
this._domElements=_1.domElements;
this._domElement=null;
if(_1.domElements.length>0){
this._domElement=$get(this._domElements[0]);
}
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;
this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection(this);
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;
},get_start:function(){
return this._start;
},get_end:function(){
return this._end;
},get_toolTip:function(){
return this._toolTip;
},set_toolTip:function(_6){
this._toolTip=_6;
},get_radScheduler:function(){
return this._radScheduler;
},get_allowEdit:function(){
return this._allowEdit;
},set_allowEdit:function(_7){
this._allowEdit=_7;
},get_allowDelete:function(){
return this._allowDelete;
},set_allowDelete:function(_8){
this._allowDelete=_8;
},get_element:function(){
return this._domElement;
},get_attributes:function(){
return this._attributes;
},_getDuration:function(){
return this._end-this._start;
},_setDuration:function(_9){
var _a=_9/60000;
var _b=this._domElement.parentNode.parentNode.offsetHeight;
var _c=$telerik.getBorderWidth(this._domElement.parentNode.parentNode,Telerik.Web.BoxSide.Bottom);
var _d=((_a/this.get_radScheduler().get_minutesPerRow())*_b)-_c;
var _e=parseInt(this._domElement.style.paddingBottom);
if(isNaN(_e)){
_e=0;
}
this._domElement.style.height=_d-_e+"px";
var _f=$telerik.getElementByClassName(this._domElement,"rsAptBottom","div");
this.get_radScheduler()._fixIEBottom(_f);
this._end.setTime(this._start.getTime());
Telerik.Web.UI.SchedulerAppointment._incrementMilliseconds(this._end,_9);
},_startDrag:function(){
var _10=this._domElement;
var _11=this.get_radScheduler().get_element();
this._dragTimeout=window.setTimeout(function(){
$telerik.setOpacity(_10,0.8);
_11.style.cursor="move";
},100);
this._oldZIndex=this._domElement.style.zIndex;
this._domElement.style.zIndex=999;
this._originalParent=this._domElement.parentNode;
Sys.UI.DomElement.removeCssClass(_10,"rsWAppointmentDelete");
},_endDrag:function(_12){
this._finishDrag(_12,false);
},_abortDrag:function(){
this._finishDrag(null,true);
},_finishDrag:function(_13,_14){
var _15=this.get_radScheduler();
window.clearTimeout(this._dragTimeout);
$telerik.setOpacity(this._domElement,1);
this._domElement.style.zindex=this._oldZIndex;
var _16=this.get_radScheduler().get_element();
if(_16&&_16.style){
this.get_radScheduler().get_element().style.cursor="";
}
var _17;
var _18=this._getDuration();
var _19="Move";
var _1a=_15._activeModel.getTimeSlotFromDomElement(this._originalParent.parentNode);
var _1b=_15._activeModel.getTimeSlotFromDomElement(_13);
if(this._originalParent.parentNode==_13||_14){
if(this._domElement.parentNode!=this._originalParent){
this._originalParent.appendChild(this._domElement);
}
var _1c=new Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs(this,_1b.get_startTime(),_1d,_1b);
this.get_radScheduler().raiseEvent("appointmentMoveEnd",_1c);
return;
}
_17={Command:_19,AppointmentID:this._internalID,EditSeries:false,SourceSlotIndex:_1a.get_index(),TargetSlotIndex:_1b.get_index()};
var _1e={OnConfirm:this._onAppointmentMoveCallback,OnAbort:this._onAppointmentMoveAbortCallback,Scheduler:this.get_radScheduler(),Appointment:this,TargetSlot:_1b,PostbackEvent:_17,CallbackIsCalledFromDialog:true};
if(_15.get_displayRecurrenceActionDialogOnMove()&&(this._recurrenceState==1||this._recurrenceState==2)){
var _1f=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(_1e.Appointment,Telerik.Web.UI.RecurrenceAction.Move);
_15.raise_recurrenceActionDialogShowing(_1f);
if(_1f.get_cancel()){
var _1d=_1f.get_editSeries();
if(_1d!==null){
_1e.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(_1d,_1e);
}else{
this._onAppointmentMoveAbortCallback(_1e);
}
}else{
_15._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Move,_1e);
}
}else{
_1e.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(false,_1e);
}
},_onAppointmentMoveCallback:function(_20,_21){
if(_21.CallbackIsCalledFromDialog){
var _22=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(_21.Appointment,Telerik.Web.UI.RecurrenceAction.Move,_20);
_21.Scheduler.raise_recurrenceActionDialogClosed(_22);
}
var _23=new Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs(_21.Appointment,_21.TargetSlot.get_startTime(),_20,_21.TargetSlot);
_21.Scheduler.raiseEvent("appointmentMoveEnd",_23);
if(_23.get_cancel()==false){
_21.PostbackEvent.EditSeries=_20;
_21.Scheduler.postback(_21.PostbackEvent);
}else{
_21.Appointment._abortDrag();
}
},_onAppointmentMoveAbortCallback:function(_24){
_24.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(_1){
var _2=this._array.length;
this.insert(_2,_1);
},insert:function(_3,_4){
Array.insert(this._array,_3,_4);
},remove:function(_5){
Array.remove(this._array,_5);
},removeAt:function(_6){
var _7=this.getAppointment(_6);
if(_7){
this.remove(_7);
}
},clear:function(){
this._array=new Array();
},get_count:function(){
return this._array.length;
},getAppointment:function(_8){
return this._array[_8];
},indexOf:function(_9){
return Array.indexOf(this._array,_9);
},forEach:function(_a){
for(var i=0,_c=this.get_count();i<_c;i++){
_a(this.getAppointment(i));
}
},getAppointmentsInRange:function(_d,_e){
var _f=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(_10){
var _11=_10.get_start();
var _12=_10.get_end();
if(_11<_e&&_12>_d){
_f.add(_10);
}
});
return _f;
},getAppointmentsStartingInRange:function(_13,end){
var _15=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(_16){
var _17=_16.get_start();
if(_17>=_13&&_17<end){
_15.add(_16);
}
});
return _15;
}};
Telerik.Web.UI.SchedulerAppointmentCollection.registerClass("Telerik.Web.UI.SchedulerAppointmentCollection");;Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointmentEventArgs=function(_1){
Telerik.Web.UI.SchedulerAppointmentEventArgs.initializeBase(this);
this._appointment=_1;
};
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(_2){
Telerik.Web.UI.SchedulerAppointmentCancelEventArgs.initializeBase(this);
this._appointment=_2;
};
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(_3){
Telerik.Web.UI.SchedulerAppointmentClickEventArgs.initializeBase(this,[_3]);
};
Telerik.Web.UI.SchedulerAppointmentClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentClickEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs=function(_4,_5,_6,_7){
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.initializeBase(this);
this._startTime=_4;
this._isAllDay=_5;
this._resource=_6;
this._targetSlot=_7;
};
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.prototype={get_startTime:function(){
return this._startTime;
},get_isAllDay:function(){
return this._isAllDay;
},get_resource:function(){
return this._resource;
},get_targetSlot:function(){
return this._targetSlot;
}};
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs=function(_8){
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs.initializeBase(this,[_8]);
};
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs=function(_9,_a,_b){
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs.initializeBase(this,[_9]);
this._newTime=_a;
this._editingRecurringSeries=_b;
};
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(_c,_d){
Telerik.Web.UI.SchedulerAppointmentResizingEventArgs.initializeBase(this,[_c]);
this._targetSlot=_d;
};
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(_e,_f){
Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs.initializeBase(this,[_e]);
this._editingRecurringSeries=_f;
};
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(_10){
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs.initializeBase(this,[_10]);
};
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs=function(_11,_12){
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs.initializeBase(this,[_11]);
this._editingRecurringSeries=_12;
};
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(_13){
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs.initializeBase(this,[_13]);
};
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs=function(_14,_15){
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs.initializeBase(this,[_14]);
this._targetSlot=_15;
};
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(_16,_17,_18,_19){
Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs.initializeBase(this,[_16]);
this._targetSlot=_19;
this._newStartTime=_17;
this._editingRecurringSeries=_18;
};
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(_1a,_1b){
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs.initializeBase(this);
this._time=_1a;
this._targetSlot=_1b;
};
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(_1c){
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs.initializeBase(this,[_1c]);
};
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs=function(_1d,_1e){
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.initializeBase(this,[_1d]);
this._recurrenceAction=_1e;
this._editSeries=null;
};
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.prototype={get_recurrenceAction:function(){
return this._recurrenceAction;
},get_editSeries:function(){
return this._editSeries;
},set_editSeries:function(_1f){
this._editSeries=_1f;
}};
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs=function(_20,_21,_22){
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs.initializeBase(this,[_20]);
this._recurrenceAction=_21;
this._editSeries=_22;
};
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(_23,_24){
Telerik.Web.UI.SchedulerFormCreatedEventArgs.initializeBase(this,[_23]);
this._formElement=_24;
};
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(_25,_26){
Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs.initializeBase(this,[_25]);
this._domEvent=_26;
};
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(_27,_28,_29,_2a){
Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs.initializeBase(this);
this._time=_27;
this._isAllDay=_28;
this._domEvent=_29;
this._targetSlot=_2a;
};
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(_1){
Telerik.Web.UI.RadScheduler.initializeBase(this,[_1]);
this._postBackReference=null;
this._minutesPerRow=30;
this._selectedView=null;
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._inPostback=false;
this._dragging=false;
this._editing=false;
this._draggingAppointment=null;
this._selectedAppointment=null;
this._onKeyboardEventDelegate=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(_2){
var _3=$get(_2);
var _4=_3.offsetHeight;
var _5=_4;
var _6=null;
var _7=_3.childNodes;
var _8=_7.length;
for(var i=0;i<_8;i++){
var _a=_7[i];
if(_a.tagName&&_a.tagName.toLowerCase()=="div"){
if(Sys.UI.DomElement.containsCssClass(_a,"rsContent")){
_6=_a;
}else{
_5-=_a.offsetHeight;
}
}
}
if(_6!=null){
var _b=$telerik.getPaddingBox(_6).vertical;
var _c=$telerik.getBorderBox(_6).vertical;
_5-=_b+_c;
_5=Math.max(_5,50);
if(_5!=_6.offsetHeight){
_6.style.height=_5+"px";
}
}
var _d=$telerik.getElementByClassName(_3,"rsAllDayLastCell","td");
if(_d){
_d.firstChild.style.width=(Telerik.Web.UI.RadScheduler._getScrollBarWidth()-1)+"px";
}
var _e=$telerik.getElementByClassName(_3,"rsColumnHeaderLastCell","td");
if(_e){
_e.firstChild.style.width=(Telerik.Web.UI.RadScheduler._getScrollBarWidth()-1)+"px";
}
};
Telerik.Web.UI.RadScheduler._incrementTime=function(_f,_10,_11){
if(isNaN(_11)){
_11=0;
}
_f.setTime(_f.getTime()+(_10*3600000)+(_11*60000));
};
Telerik.Web.UI.RadScheduler._getScrollBarWidth=function(){
var _12,_13=0;
var _14=document.createElement("div");
_14.style.position="absolute";
_14.style.top="-1000px";
_14.style.left="-1000px";
_14.style.width="100px";
_14.style.height="50px";
_14.style.overflow="hidden";
var _15=document.createElement("div");
_15.style.width="100%";
_15.style.height="200px";
_14.appendChild(_15);
document.body.appendChild(_14);
var _16=_15.offsetWidth;
_14.style.overflow="auto";
var _17=_15.offsetWidth;
Telerik.Web.UI.RadScheduler._scrollbarWidth=_16-_17;
if(Telerik.Web.UI.RadScheduler._scrollbarWidth<=0){
_15.style.width="300px";
_12=_14.offsetWidth;
_13=_14.clientWidth;
Telerik.Web.UI.RadScheduler._scrollbarWidth=_12-_13;
}
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.prototype={initialize:function(){
var _18=this.get_element();
if(this.get_overflowBehavior()==1){
var _19=this.get_id();
_18.RadShow=function(){
Telerik.Web.UI.RadScheduler._adjustHeight(_19);
if(typeof (Telerik.Web.UI.Scheduling)!="undefined"&&typeof (Telerik.Web.UI.Scheduling.AdvancedTemplate)!="undefined"){
Telerik.Web.UI.Scheduling.AdvancedTemplate._adjustHeight(_19);
}
};
_18.RadResize=_18.RadShow;
}
Telerik.Web.UI.RadScheduler.callBaseMethod(this,"initialize");
this._activeModel=new (Type.parse(this._modelClassName))(this,this._modelData);
this._activeModel.initialize();
this._eventMap.initialize(this);
this._initializeModelTables();
this._initializeDivs(_18);
var _1a=$telerik.getFirstChildByTagName(_18,"div",0);
if(_1a&&Sys.UI.DomElement.containsCssClass(_1a,"rsAdvancedEdit")){
this._advancedFormDiv=_1a;
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("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","rsCell",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._startDrag);
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);
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);
var _1b=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
if(_1b){
_1b.scrollTop=this.get_scrollTop();
}
this._fireFormCreated();
},dispose:function(){
var _1c=this.get_element();
if(this._onKeyboardEventDelegate){
$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
}
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");
},get_appointments:function(){
return this._appointments;
},set_appointments:function(_1d){
this._appointments=new Telerik.Web.UI.SchedulerAppointmentCollection();
var _1e=Sys.Serialization.JavaScriptSerializer.deserialize(_1d);
for(var i=0;i<_1e.length;i++){
var _20=new Telerik.Web.UI.SchedulerAppointment(_1e[i],this);
this._appointments.add(_20);
}
},get_resources:function(){
return this._resources;
},set_resources:function(_21){
this._resources=new Telerik.Web.UI.SchedulerResourceCollection();
var _22=Sys.Serialization.JavaScriptSerializer.deserialize(_21);
for(var i=0;i<_22.length;i++){
var _24=new Telerik.Web.UI.SchedulerResource(_22[i]);
this._resources.add(_24);
}
},get_firstDayStart:function(){
return this._firstDayStart;
},set_firstDayStart:function(_25){
this._firstDayStart=Sys.Serialization.JavaScriptSerializer.deserialize(_25);
},get_currentAppointment:function(){
return this._currentAppointment;
},set_currentAppointment:function(_26){
var _27=Sys.Serialization.JavaScriptSerializer.deserialize(_26);
this._currentAppointment=new Telerik.Web.UI.SchedulerAppointment(_27,this,null);
},get_localization:function(){
return this._localization;
},set_localization:function(_28){
this._localization=Sys.Serialization.JavaScriptSerializer.deserialize(_28);
},get_scrollTop:function(){
return this._scrollTop;
},set_scrollTop:function(_29){
this._scrollTop=_29;
},get_displayDeleteConfirmation:function(){
return this._displayDeleteConfirmation;
},set_displayDeleteConfirmation:function(_2a){
this._displayDeleteConfirmation=_2a;
},get_displayRecurrenceActionDialogOnMove:function(){
return this._displayRecurrenceActionDialogOnMove;
},set_displayRecurrenceActionDialogOnMove:function(_2b){
this._displayRecurrenceActionDialogOnMove=_2b;
},get_shouldPostbackOnClick:function(){
return this._shouldPostbackOnClick;
},set_shouldPostbackOnClick:function(_2c){
this._shouldPostbackOnClick=_2c;
},get_overflowBehavior:function(){
return this._overflowBehavior;
},set_overflowBehavior:function(_2d){
this._overflowBehavior=_2d;
},get_readOnly:function(){
return this._readOnly;
},set_readOnly:function(_2e){
this._readOnly=_2e;
},get_selectedView:function(){
return this._selectedView;
},set_selectedView:function(_2f){
this._selectedView=_2f;
},get_minutesPerRow:function(){
return this._minutesPerRow;
},set_minutesPerRow:function(_30){
this._minutesPerRow=_30;
},get_postBackReference:function(){
return this._postBackReference;
},set_postBackReference:function(_31){
this._postBackReference=_31;
},get_allowEdit:function(){
return this._allowEdit;
},set_allowEdit:function(_32){
this._allowEdit=_32;
},get_allowDelete:function(){
return this._allowDelete;
},set_allowDelete:function(_33){
this._allowDelete=_33;
},get_allowInsert:function(){
return this._allowInsert;
},set_allowInsert:function(_34){
this._allowInsert=_34;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_35){
this._attributes._load(_35);
},getAppointmentDomElement:function(_36){
while(_36&&!Sys.UI.DomElement.containsCssClass(_36,"rsApt")){
_36=_36.parentNode;
}
return _36;
},getAppointmentFromDomElement:function(_37){
if(!_37){
return null;
}
var _38=this.getAppointmentDomElement(_37);
var _39=this.get_appointments();
for(var i=0;i<_39.get_count();i++){
var _3b=_39.getAppointment(i);
if(!_3b._domElement){
continue;
}
for(var _3c=0;_3c<_3b._domElements.length;_3c++){
if(_38.id==_3b._domElements[_3c]){
return _3b;
}
}
}
return null;
},_fireFormCreated:function(){
if(this._shouldFireFormCreated){
var _3d=this.get_element();
if(this._inlineFormDiv){
_3d=this._inlineFormDiv;
}else{
if(this._advancedFormDiv){
_3d=this._advancedFormDiv;
}
}
var _3e=new Telerik.Web.UI.SchedulerFormCreatedEventArgs(this.get_currentAppointment(),_3d);
this.raise_formCreated(_3e);
}
},_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();
}
}
},_initializeDivs:function(_40){
var _41=_40.getElementsByTagName("div");
var _42=_41.length;
for(var i=0;i<_42;i++){
var _44=_41[i];
if(Sys.UI.DomElement.containsCssClass(_44,"rsAptEdit")){
this._inlineFormDiv=_44;
var _45=_44.getElementsByTagName("textarea")[0];
if(_45){
window.setTimeout(function(){
if(_45&&_45.focus&&_45.parentNode){
_45.focus();
}
},500);
}
}
}
if(this.get_overflowBehavior()==1){
_40.RadShow();
}
},_onAppointmentClick:function(e){
var _47=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_47.Selected){
this._editAppointmentInline(_47);
return;
}
var _48=new Telerik.Web.UI.SchedulerAppointmentClickEventArgs(_47);
this.raise_appointmentClick(_48);
if(this.get_readOnly()&&this.get_shouldPostbackOnClick()){
var _49={Command:"Click",AppointmentID:_47._internalID,EditSeries:false};
this.postback(_49);
return;
}
if(this._selectedAppointment){
this._selectedAppointment._unselect();
}
_47._select();
this._selectedAppointment=_47;
},_onAppointmentContextMenu:function(e){
var _4b=this.getAppointmentFromDomElement(e.eventMapTarget);
var _4c=new Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs(_4b,e);
this.raise_appointmentContextMenu(_4c);
},_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(_4f){
var _50=_4f;
while(_50.tagName.toLowerCase()!="th"){
_50=_50.parentNode;
}
return _50;
},_onAllDayCellMouseOver:function(e){
if(this._dragging&&this._draggingAppointment){
e.eventMapTarget.lastChild.appendChild(this._draggingAppointment._domElement);
}
this._onRowMouseOver(e);
},_onRowMouseOver:function(e){
if(this._dragging){
return;
}
if(!this._resizingState.resizing){
this._removeRowHover();
this._currentHoverDiv=e.eventMapTarget;
this._currentHoverCell=e.eventMapTarget;
this._nextHoverCell=this._getNextRowCell(this._currentHoverCell);
if(Sys.UI.DomElement.containsCssClass(this._currentHoverCell.parentNode,"rsAllDay")){
this._nextHoverCell=null;
}
Sys.UI.DomElement.addCssClass(this._currentHoverCell,"rsAptCreate");
if(this._nextHoverCell&&this.get_selectedView()!=Telerik.Web.UI.SchedulerViewType.MonthView){
Sys.UI.DomElement.addCssClass(this._nextHoverCell,"rsAptCreate");
}
}
},_getNextRowCell:function(_53){
var _54=_53.parentNode;
var _55=_54.parentNode;
while(_55.tagName.toLowerCase()!="table"){
_55=_55.parentNode;
}
var _56=_55.rows[_54.rowIndex+1];
var _57=null;
if(_56){
var _58=_56.cells.length;
var _59=_54.cells.length;
if(_58==_59){
_57=_56.cells[_53.cellIndex];
}else{
if(_58<_59){
_57=_56.cells[_53.cellIndex-1];
}else{
_57=_56.cells[_53.cellIndex+1];
}
}
}
return _57;
},_onRowMouseOut:function(e){
try{
var _5b=e.rawEvent.relatedTarget?e.rawEvent.relatedTarget:e.rawEvent.toElement;
if(!_5b||!this._currentHoverCell||$telerik.isDescendant(this._currentHoverDiv,_5b)){
return;
}
this._removeRowHover();
}
catch(ex){
return;
}
},_removeRowHover:function(){
if(this._currentHoverCell){
Sys.UI.DomElement.removeCssClass(this._currentHoverCell,"rsAptCreate");
}
this._currentHoverCell=null;
if(this._nextHoverCell){
Sys.UI.DomElement.removeCssClass(this._nextHoverCell,"rsAptCreate");
}
this._nextHoverCell=null;
},_stopEventPropagation:function(e){
e.stopPropagation();
},_onResizeGripMouseDown:function(e){
if(this.get_readOnly()){
return;
}
this._resizingState.resizingElement=this.getAppointmentDomElement(e.eventMapTarget);
var _5e=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _5f=(_5e.get_allowEdit()!=null)?_5e.get_allowEdit():this.get_allowEdit();
if(!_5f){
return;
}
var _60=new Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs(_5e);
this.raise_appointmentResizeStart(_60);
if(_60.get_cancel()==false){
this._resizingState.resizing=true;
this._resizingState.resizingAppointment=_5e;
this._resizingState.resizingAppointmentDuration=_5e._getDuration();
$addHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$addHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$addHandler(document,"selectstart",this._onSelectStartDelegate);
}
},_onResizeGripMouseMove:function(e){
if(!this._resizingState.resizingElement){
return;
}
var _62=this._resizingState.resizingElement.parentNode.parentNode;
var _63=10;
var _64=this._getCellFromCoordinates(e.clientX,e.clientY-_63);
if(!_64){
return;
}
var _65=this._activeModel.getTimeSlotFromDomElement(_64);
var _66=new Telerik.Web.UI.SchedulerAppointmentResizingEventArgs(this._resizingState.resizingAppointment,_65);
this.raise_appointmentResizing(_66);
if(_66.get_cancel()){
return;
}
var _67=_62.offsetHeight;
var _68=_64.parentNode.rowIndex-_62.parentNode.rowIndex;
var _69=Math.max(1,(_68+1))*_67;
var _6a=_62.parentNode.parentNode.parentNode;
var _6b=_64.parentNode.parentNode.parentNode;
if(_6a!=_6b){
return;
}
var _6c=parseInt(this._resizingState.resizingElement.style.paddingBottom);
_6c=isNaN(_6c)?0:_6c;
this._resizingState.resizingElement.style.height=(_69-_6c)+"px";
this._fixIEBottom($telerik.getElementByClassName(this._resizingState.resizingElement,"rsAptBottom","div"));
this._keepElementInView(this._resizingState.resizingElement,true);
},_onSelectStart:function(e){
return false;
},_findResizeTargetSlot:function(_6e){
var _6f=_6e.parentNode.parentNode.offsetHeight;
var _70=Math.ceil(_6e.offsetHeight/_6f);
var _71=_6e.parentNode.parentNode;
var _72=_71.parentNode;
var _73=_72.rowIndex+_70-1;
_73=Math.min(_73,_72.parentNode.rows.length-1);
var _74=_72.parentNode.rows[_73];
var _75=_74.cells[_71.cellIndex];
return this._activeModel.getTimeSlotFromDomElement(_75);
},_onResizeGripMouseUp:function(e){
if(!this._resizingState.resizingElement){
return;
}
var _77=this._findResizeTargetSlot(this._resizingState.resizingElement);
var _78=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _79=this._activeModel.getTimeSlotFromDomElement(_78.get_element());
var _7a={OnConfirm:this._onAppointmentResizeCallback,OnAbort:this._onAppointmentResizeAbortCallback,Scheduler:this,Appointment:_78,SourceSlotIndex:_79.get_index(),TargetSlotIndex:_77.get_index(),ResizingAppointmentDuration:this._resizingState.resizingAppointmentDuration,CallbackIsCalledFromDialog:true};
if(_78._recurrenceState==1||_78._recurrenceState==2){
var _7b=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(_7a.Appointment,Telerik.Web.UI.RecurrenceAction.Resize);
this.raise_recurrenceActionDialogShowing(_7b);
if(_7b.get_cancel()){
var _7c=_7b.get_editSeries();
if(_7c!==null){
_7a.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(_7c,_7a);
}else{
this._onAppointmentResizeAbortCallback(_7a);
}
}else{
this._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Resize,_7a);
}
}else{
_7a.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(false,_7a);
}
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(_7d,_7e){
if(_7e.CallbackIsCalledFromDialog){
var _7f=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(_7e.Appointment,Telerik.Web.UI.RecurrenceAction.Resize,_7d);
_7e.Scheduler.raise_recurrenceActionDialogClosed(_7f);
}
var _80=new Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs(_7e.Appointment,_7e.UpdatedEndDate,_7d);
_7e.Scheduler.raise_appointmentResizeEnd(_80);
if(_80.get_cancel()==false){
var _81={Command:"Resize",AppointmentID:_7e.Appointment._internalID,SourceSlotIndex:_7e.SourceSlotIndex,TargetSlotIndex:_7e.TargetSlotIndex,EditSeries:_7d};
_7e.Scheduler.postback(_81);
}else{
_7e.Appointment._setDuration(_7e.ResizingAppointmentDuration);
}
},_onAppointmentResizeAbortCallback:function(_82){
_82.Appointment._setDuration(_82.ResizingAppointmentDuration);
},_onResizeGripMouseClick:function(e){
e.stopPropagation();
},_onResizeGripMouseOver:function(e){
e.target.style.cursor="s-resize";
e.stopPropagation();
},_fixIEBottom:function(_85){
if($telerik.isIE6){
if(_85.parentNode.parentNode.offsetHeight%2!=0){
_85.style.bottom="-1px";
}else{
_85.style.bottom="0px";
}
}
},_initializeModelTables:function(){
if(!this._modelTables){
this._modelTables=new Array();
var _86=this.get_element().getElementsByTagName("table");
for(var i=0;i<_86.length;i++){
var _88=_86[i];
if(Sys.UI.DomElement.containsCssClass(_88,"rsContentTable")||Sys.UI.DomElement.containsCssClass(_88,"rsAllDayTable")||Sys.UI.DomElement.containsCssClass(_88,"rsTimelineTable")){
_88.targetRect=$telerik.getBounds(_88);
var _89=_88.rows[0].cells[0];
_88.cellWidth=_89.offsetWidth;
_88.cellHeight=_89.offsetHeight;
Array.add(this._modelTables,_88);
}
}
}
return this._modelTables;
},_getCellFromCoordinates:function(_8a,_8b){
var _8c=this._modelTables;
var _8d=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _8e=$telerik.getScrollOffset(_8d,true);
for(var i=0,_90=_8c.length;i<_90;i++){
var x=_8a+_8e.x;
var y=_8b+_8e.y;
var _93=_8c[i];
var _94=_93.targetRect;
var _95=_94.y+_94.height;
var _96=_94.x+_94.width;
if(x>=_94.x&&x<=_96&&y>=_94.y&&y<=_95){
var _97=parseInt((y-_94.y)/_93.cellHeight);
_97=Math.min(_93.rows.length-1,Math.max(0,_97));
var _98=parseInt((x-_94.x)/_93.cellWidth);
_98=Math.min(_93.rows[_97].cells.length-1,Math.max(0,_98));
return _93.rows[_97].cells[_98];
}
}
return null;
},_onDocumentMouseMove:function(e){
if(this._dragging&&this._draggingAppointment){
var _9a=this._getCellFromCoordinates(e.clientX,e.clientY-this._draggingOffset);
if(!_9a||_9a.firstChild==this._draggingAppointment._domElement.parentNode){
return;
}
if(_9a.firstChild.nodeType==3){
_9a.removeChild(_9a.firstChild);
var _9b=this._draggingAppointment._domElement.parentNode.cloneNode(false);
_9b.style.zIndex=_9a.parentNode.parentNode.rows.length-_9a.parentNode.rowIndex;
if($telerik.isFirefox){
_9b.style.height=_9a.clientHeight+"px";
}
_9a.appendChild(_9b);
}
if(this.get_selectedView()!=Telerik.Web.UI.SchedulerViewType.MonthView){
_9a.firstChild.appendChild(this._draggingAppointment._domElement);
}else{
_9a.childNodes[1].appendChild(this._draggingAppointment._domElement);
}
var _9c=this._activeModel.getTimeSlotFromDomElement(_9a);
var _9d=new Telerik.Web.UI.SchedulerAppointmentMovingEventArgs(this._draggingAppointment,_9c);
this.raiseEvent("appointmentMoving",_9d);
if(_9d.get_cancel()){
this._abortDrag(e);
}else{
if(!_9c.get_isAllDay()){
this._keepElementInView(this._draggingAppointment._domElement);
}
}
return;
}
},_keepElementInView:function(_9e,_9f){
var _a0=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _a1=this._getRelativeOffsetTop(_9e,_a0);
var _a2=_9e.offsetHeight;
var _a3=_a1+_a2;
var _a4=_a0.clientHeight+_a0.scrollTop;
var _a5=_9e.parentNode.parentNode.offsetHeight;
if(!_9f&&_a1<_a0.scrollTop){
_a0.scrollTop=_a1;
}
if(_a3>_a4){
var _a6=_a0.scrollTop+(_a3-_a4);
if((_a0.clientHeight+_a6)>_a0.scrollHeight){
return;
}
if(!_9f&&_a6>_a1){
_a6=_a1;
}
_a0.scrollTop=_a6;
}
if(_9f&&(_a3-_a5)<_a0.scrollTop){
_a0.scrollTop=_a3-_a5;
}
},_getRelativeOffsetTop:function(_a7,_a8){
var _a9=_a7.offsetParent;
var _aa=_a7.offsetTop;
while(_a9!=_a8){
_aa+=_a9.offsetTop;
if(!_a9.offsetParent){
break;
}
_a9=_a9.offsetParent;
}
return _aa;
},_startDrag:function(e){
if(this.get_readOnly()){
return;
}
var _ac=this.getAppointmentFromDomElement(e.eventMapTarget);
var _ad=(_ac.get_allowEdit()!=null)?_ac.get_allowEdit():this.get_allowEdit();
if(!_ad){
return;
}
var _ae=new Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs(_ac);
this.raiseEvent("appointmentMoveStart",_ae);
if(_ae.get_cancel()){
return;
}
$addHandler(document,"selectstart",this._onSelectStartDelegate);
$addHandler(document,"mouseup",this._onDocMouseUpDelegate);
$addHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._draggingAppointment=_ac;
this._dragging=true;
var _af=this._draggingAppointment.get_element();
var _b0=$telerik.getLocation(_af);
if($telerik.isFirefox||$telerik.isSafari){
var _b1=$telerik.getScrollOffset(_af,true);
_b0.x-=_b1.x;
_b0.y-=_b1.y;
if($telerik.isFirefox){
_b0.x+=document.body.parentNode.scrollLeft;
_b0.y+=document.body.parentNode.scrollTop;
}else{
_b0.x+=document.body.scrollLeft;
_b0.y+=document.body.scrollTop;
}
}
var _b2=$telerik.getLocation(this._getCellFromCoordinates(e.clientX,e.clientY));
var _b3=e.clientY-_b0.y;
var _b4=e.clientY-_b2.y;
this._draggingOffset=_b3-_b4;
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView||this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.TimelineView){
this._draggingOffset=0;
}
_ac._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,_b9){
if(this._dragging){
$removeHandler(document,"selectstart",this._onSelectStartDelegate);
$removeHandler(document,"mouseup",this._onDocMouseUpDelegate);
$removeHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
if(!_b9&&this._draggingAppointment._domElement.parentNode&&this._draggingAppointment._domElement.parentNode.parentNode){
var _ba=this._draggingAppointment._domElement.parentNode.parentNode;
this._draggingAppointment._endDrag(_ba);
}else{
this._draggingAppointment._abortDrag();
}
this._draggingAppointment=null;
this._dragging=false;
e.preventDefault();
e.stopPropagation();
}
},_onAppointmentDoubleClick:function(e){
if(this._resizingState.resizing){
this._resizingState.resizing=false;
e.stopPropagation();
return;
}
this._clearSelection();
var _bc=this.getAppointmentFromDomElement(e.eventMapTarget);
var _bd=new Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs(_bc);
this.raise_appointmentDoubleClick(_bd);
this._editAppointmentInline(_bc);
e.stopPropagation();
},_editAppointmentInline:function(_be){
if(this.get_readOnly()){
return;
}
if(_be){
var _bf=(_be.get_allowEdit()!=null)?_be.get_allowEdit():this.get_allowEdit();
if(!_bf){
return;
}
var _c0={OnConfirm:this._onAppointmentEditCallback,Scheduler:this,Appointment:_be,CallbackIsCalledFromDialog:true};
if(_be._recurrenceState==1||_be._recurrenceState==2||_be._recurrenceState==3){
var _c1=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(_c0.Appointment,Telerik.Web.UI.RecurrenceAction.Edit);
this.raise_recurrenceActionDialogShowing(_c1);
if(_c1.get_cancel()){
var _c2=_c1.get_editSeries();
if(_c2!==null){
_c0.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(_c2,_c0);
}
}else{
this._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Edit,_c0);
}
}else{
_c0.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(false,_c0);
}
}
},_onAppointmentEditCallback:function(_c3,_c4){
if(_c4.CallbackIsCalledFromDialog){
var _c5=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(_c4.Appointment,Telerik.Web.UI.RecurrenceAction.Edit,_c3);
_c4.Scheduler.raise_recurrenceActionDialogClosed(_c5);
}
if(!this._editing){
var _c6=new Telerik.Web.UI.SchedulerAppointmentEditingEventArgs(_c4.Appointment,_c3);
_c4.Scheduler.raise_appointmentEditing(_c6);
if(_c6.get_cancel()==false){
this._editing=true;
var _c7={Command:"Edit",AppointmentID:_c4.Appointment._internalID,EditSeries:_c3};
_c4.Scheduler.postback(_c7);
}
}
},_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 _c9=this._getCellTimeFromDomElement(e.eventMapTarget);
var _ca={Command:"SwitchToSelectedDay",StartDate:_c9};
this.postback(_ca);
},_onAppointmentMouseOver:function(e){
if(this._resizingState.resizing||this._dragging){
e.stopPropagation();
return;
}
var _cc=this.getAppointmentDomElement(e.eventMapTarget);
var _cd=this.getAppointmentFromDomElement(_cc);
var _ce=(_cd.get_allowDelete()!=null)?_cd.get_allowDelete():this.get_allowDelete();
if(!_ce){
return;
}
this._hoveredAppointmentElement=_cc;
var _cf=$telerik.getElementByClassName(_cc,"rsAptDelete","a");
if(_cf){
_cf.style.visibility="visible";
}
},_onAppointmentMouseOut:function(e){
var _d1=e.rawEvent.relatedTarget?e.rawEvent.relatedTarget:e.rawEvent.toElement;
if(!_d1||$telerik.isDescendant(this._hoveredAppointmentElement,_d1)){
return;
}else{
var _d2=this.getAppointmentDomElement(e.eventMapTarget);
var _d3=$telerik.getElementByClassName(_d2,"rsAptDelete","a");
if(_d3){
_d3.style.visibility="hidden";
}
}
},_getCellCoordinates:function(_d4){
while(_d4&&(_d4.tagName.toLowerCase()!="td")){
_d4=_d4.parentNode;
}
if(_d4){
var _d5=_d4.cellIndex;
var _d6=_d4.parentNode.rowIndex;
return {cellIndex:_d5,rowIndex:_d6};
}
return -1;
},_getCellTimeFromDomElement:function(_d7){
var _d8=new Date(this.get_firstDayStart().getTime());
var _d9=this._getCellCoordinates(_d7);
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView){
var _da=24*7*_d9.rowIndex;
var _db=24*_d9.cellIndex;
Telerik.Web.UI.RadScheduler._incrementTime(_d8,_da+_db);
}else{
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.ResourceView){
var _dc=_d9.rowIndex*this.get_minutesPerRow();
Telerik.Web.UI.RadScheduler._incrementTime(_d8,0,_dc);
}else{
var _dc=_d9.rowIndex*this.get_minutesPerRow();
Telerik.Web.UI.RadScheduler._incrementTime(_d8,24*_d9.cellIndex,_dc);
}
}
return _d8;
},_onCellClick:function(e){
var _de=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _df=new Telerik.Web.UI.SchedulerTimeSlotClickEventArgs(_de.get_startTime(),_de);
this.raise_timeSlotClick(_df);
},_onCellContextMenu:function(e){
var _e1=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _e2=new Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs(_e1.get_startTime(),_e1.get_isAllDay(),e,_e1);
this.raise_timeSlotContextMenu(_e2);
},_onCellDoubleClick:function(e){
if(!this.get_readOnly()&&this.get_allowInsert()){
var _e4=null;
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.ResourceView&&this.get_resources()){
var _e5=this._getCellCoordinates(e.eventMapTarget).cellIndex;
_e4=this.get_resources()[_e5];
}
var _e6=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _e7=new Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs(_e6.get_startTime(),_e6.get_isAllDay(),_e4,_e6);
this.raise_appointmentInserting(_e7);
if(_e7.get_cancel()==false){
var _e8={Command:"Insert",AppointmentID:-1,TargetSlotIndex:_e6.get_index()};
if(_e4){
_e8.ResourceKey=_e4.internalKey;
}
this.postback(_e8);
}
}
e.stopPropagation();
},_onAppointmentDeleteClick:function(e){
if(!this.get_readOnly()){
var _ea=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_ea){
var _eb={OnConfirm:this._onAppointmentDeleteCallback,Scheduler:this,Appointment:_ea,CallbackIsCalledFromDialog:true};
if(_ea._recurrenceState==1||_ea._recurrenceState==2||_ea._recurrenceState==3){
var _ec=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(_eb.Appointment,Telerik.Web.UI.RecurrenceAction.Delete);
this.raise_recurrenceActionDialogShowing(_ec);
if(_ec.get_cancel()){
var _ed=_ec.get_editSeries();
if(_ed!==null){
_eb.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(_ed,_eb);
}
}else{
this._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Delete,_eb);
}
}else{
if(this.get_displayDeleteConfirmation()){
this._recurrenceActionDialog.ConfirmDelete(_eb);
}else{
_eb.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(false,_eb);
}
}
}
}
e.stopPropagation();
e.preventDefault();
},_onAppointmentDeleteCallback:function(_ee,_ef){
if(_ef.CallbackIsCalledFromDialog){
var _f0=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(_ef.Appointment,Telerik.Web.UI.RecurrenceAction.Delete,_ee);
_ef.Scheduler.raise_recurrenceActionDialogClosed(_f0);
}
var _f1=new Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs(_ef.Appointment,_ee);
_ef.Scheduler.raise_appointmentDeleting(_f1);
if(_f1.get_cancel()==false){
var _f2={Command:"Delete",AppointmentID:_ef.Appointment._internalID,EditSeries:_ee};
_ef.Scheduler.postback(_f2);
}
},_onPreviousDayClick:function(e){
var _f4=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_f4){
var _f5={Command:"GoToPrevious",AppointmentID:_f4._internalID};
this.postback(_f5);
}
e.stopPropagation();
e.preventDefault();
},_onNextDayClick:function(e){
var _f7=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_f7){
var _f8={Command:"GoToNext",AppointmentID:_f7._internalID};
this.postback(_f8);
}
e.stopPropagation();
e.preventDefault();
},_onDayViewTabClick:function(e){
var _fa={Command:"SwitchToDayView"};
this.postback(_fa);
e.stopPropagation();
e.preventDefault();
},_onWeekViewTabClick:function(e){
var _fc={Command:"SwitchToWeekView"};
this.postback(_fc);
e.stopPropagation();
e.preventDefault();
},_onMonthViewTabClick:function(e){
var _fe={Command:"SwitchToMonthView"};
this.postback(_fe);
e.stopPropagation();
e.preventDefault();
},_onTimelineViewTabClick:function(e){
var _100={Command:"SwitchToTimelineView"};
this.postback(_100);
e.stopPropagation();
e.preventDefault();
},_onPreviousSchedulerDayClick:function(e){
var _102={Command:"NavigateToPreviousPeriod"};
this.postback(_102);
e.stopPropagation();
e.preventDefault();
},_onNextSchedulerDayClick:function(e){
var _104={Command:"NavigateToNextPeriod"};
this.postback(_104);
e.stopPropagation();
e.preventDefault();
},_onTodayClick:function(e){
var _106={Command:"GoToToday"};
this.postback(_106);
e.stopPropagation();
e.preventDefault();
},_onFullTimeLinkClick:function(e){
var _108={Command:"SwitchFullTime"};
this.postback(_108);
e.stopPropagation();
e.preventDefault();
},postback:function(args){
var _10a=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
args.ScrollTop=_10a.scrollTop;
this._inPostback=true;
var _10b=this.get_postBackReference().replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(args));
eval(_10b);
},_getElementIndex:function(_10c,_10d){
for(var i=0;i<_10c.length;i++){
if(_10c[i]===_10d){
return i;
}
}
return -1;
},add_appointmentClick:function(_10f){
this.get_events().addHandler("AppointmentClick",_10f);
},remove_appointmentClick:function(_110){
this.get_events().removeHandler("AppointmentClick",_110);
},raise_appointmentClick:function(args){
this.raiseEvent("AppointmentClick",args);
},add_appointmentInserting:function(_112){
this.get_events().addHandler("AppointmentInserting",_112);
},remove_appointmentInserting:function(_113){
this.get_events().removeHandler("AppointmentInserting",_113);
},raise_appointmentInserting:function(_114){
this.raiseEvent("AppointmentInserting",_114);
},add_appointmentDoubleClick:function(_115){
this.get_events().addHandler("AppointmentDoubleClick",_115);
},remove_appointmentDoubleClick:function(_116){
this.get_events().removeHandler("AppointmentDoubleClick",_116);
},raise_appointmentDoubleClick:function(_117){
this.raiseEvent("AppointmentDoubleClick",_117);
},add_appointmentResizeStart:function(_118){
this.get_events().addHandler("AppointmentResizeStart",_118);
},remove_appointmentResizeStart:function(_119){
this.get_events().removeHandler("AppointmentResizeStart",_119);
},raise_appointmentResizeStart:function(args){
this.raiseEvent("AppointmentResizeStart",args);
},add_appointmentResizeEnd:function(_11b){
this.get_events().addHandler("AppointmentResizeEnd",_11b);
},remove_appointmentResizeEnd:function(_11c){
this.get_events().removeHandler("AppointmentResizeEnd",_11c);
},raise_appointmentResizeEnd:function(args){
this.raiseEvent("AppointmentResizeEnd",args);
},add_appointmentResizing:function(_11e){
this.get_events().addHandler("AppointmentResizing",_11e);
},remove_appointmentResizing:function(_11f){
this.get_events().removeHandler("AppointmentResizing",_11f);
},raise_appointmentResizing:function(args){
this.raiseEvent("AppointmentResizing",args);
},add_appointmentDeleting:function(_121){
this.get_events().addHandler("AppointmentDeleting",_121);
},remove_appointmentDeleting:function(_122){
this.get_events().removeHandler("AppointmentDeleting",_122);
},raise_appointmentDeleting:function(args){
this.raiseEvent("AppointmentDeleting",args);
},add_timeSlotClick:function(_124){
this.get_events().addHandler("TimeSlotClick",_124);
},remove_timeSlotClick:function(_125){
this.get_events().removeHandler("TimeSlotClick",_125);
},raise_timeSlotClick:function(args){
this.raiseEvent("TimeSlotClick",args);
},add_appointmentEditing:function(_127){
this.get_events().addHandler("AppointmentEditing",_127);
},remove_appointmentEditing:function(_128){
this.get_events().removeHandler("AppointmentEditing",_128);
},raise_appointmentEditing:function(args){
this.raiseEvent("AppointmentEditing",args);
},add_appointmentMoveStart:function(_12a){
this.get_events().addHandler("appointmentMoveStart",_12a);
},remove_appointmentMoveStart:function(_12b){
this.get_events().removeHandler("appointmentMoveStart",_12b);
},add_appointmentMoving:function(_12c){
this.get_events().addHandler("appointmentMoving",_12c);
},remove_appointmentMoving:function(_12d){
this.get_events().removeHandler("appointmentMoving",_12d);
},add_appointmentMoveEnd:function(_12e){
this.get_events().addHandler("appointmentMoveEnd",_12e);
},remove_appointmentMoveEnd:function(_12f){
this.get_events().removeHandler("appointmentMoveEnd",_12f);
},add_recurrenceActionDialogShowing:function(_130){
this.get_events().addHandler("RecurrenceActionDialogShowing",_130);
},remove_recurrenceActionDialogShowing:function(_131){
this.get_events().removeHandler("RecurrenceActionDialogShowing",_131);
},raise_recurrenceActionDialogShowing:function(args){
this.raiseEvent("RecurrenceActionDialogShowing",args);
},add_recurrenceActionDialogClosed:function(_133){
this.get_events().addHandler("RecurrenceActionDialogClosed",_133);
},remove_recurrenceActionDialogClosed:function(_134){
this.get_events().removeHandler("RecurrenceActionDialogClosed",_134);
},raise_recurrenceActionDialogClosed:function(args){
this.raiseEvent("RecurrenceActionDialogClosed",args);
},add_formCreated:function(_136){
this.get_events().addHandler("FormCreated",_136);
},remove_formCreated:function(_137){
this.get_events().removeHandler("FormCreated",_137);
},raise_formCreated:function(args){
this.raiseEvent("FormCreated",args);
},add_appointmentContextMenu:function(_139){
this.get_events().addHandler("AppointmentContextMenu",_139);
},remove_appointmentContextMenu:function(_13a){
this.get_events().removeHandler("AppointmentContextMenu",_13a);
},raise_appointmentContextMenu:function(args){
this.raiseEvent("AppointmentContextMenu",args);
},add_timeSlotContextMenu:function(_13c){
this.get_events().addHandler("TimeSlotContextMenu",_13c);
},remove_timeSlotContextMenu:function(_13d){
this.get_events().removeHandler("TimeSlotContextMenu",_13d);
},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(_1){
this._schedulerDomElement=_1.get_element();
this._scheduler=_1;
this._recurrenceDialogWrapper=null;
this._args=null;
this._btnOk=null;
this._btnCancel=null;
};
Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton=function(id,_3,_4,_5){
var _6;
if($telerik.isIE){
var _7="<input type=\"radio\" ";
_7+="id=\""+id+"\" ";
_7+="name=\""+_3+"\" ";
_7+="value=\""+_4+"\" ";
if(_5){
_7+="checked ";
}
_7+="/>";
_6=document.createElement(_7);
}else{
_6=document.createElement("input");
_6.id=id;
_6.type="radio";
_6.name=_3;
_6.value=_4;
_6.checked=_5;
}
return _6;
};
Telerik.Web.UI.RecurrenceActionDialog.prototype={ConfirmRecurrenceAction:function(_8,_9){
localization=this._scheduler.get_localization();
var _a;
var _b;
var _c;
switch(_8){
case Telerik.Web.UI.RecurrenceAction.Edit:
_a=localization.ConfirmRecurrenceEditTitle;
_b=localization.ConfirmRecurrenceEditOccurrence;
_c=localization.ConfirmRecurrenceEditSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Resize:
_a=localization.ConfirmRecurrenceResizeTitle;
_b=localization.ConfirmRecurrenceResizeOccurrence;
_c=localization.ConfirmRecurrenceResizeSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Delete:
_a=localization.ConfirmRecurrenceDeleteTitle;
_b=localization.ConfirmRecurrenceDeleteOccurrence;
_c=localization.ConfirmRecurrenceDeleteSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Move:
_a=localization.ConfirmRecurrenceMoveTitle;
_b=localization.ConfirmRecurrenceMoveOccurrence;
_c=localization.ConfirmRecurrenceMoveSeries;
break;
}
var d=document;
this._args=_9;
var _e=this._createDialog(_a);
if(!_e){
return;
}
var _f=_e.appendChild(d.createElement("div"));
var _10=_f.appendChild(Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton("choiceOccurrenceSpan_0","choiceOccurrenceSpan","OpenOccurrence",true));
var _11=_f.appendChild(d.createElement("label"));
_11.htmlFor=_10.id;
_11.appendChild(d.createTextNode(_b));
var _12=_e.appendChild(d.createElement("div"));
var _13=_12.appendChild(Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton("choiceOccurrenceSpan_1","choiceOccurrenceSpan","OpenSeries",false));
this._editSeriesRadio=_13;
var _14=_12.appendChild(d.createElement("label"));
_14.htmlFor=_13.id;
_14.appendChild(d.createTextNode(_c));
this._createButtons(_e,this._confirmRecurrenceActionOkClick,this._removeConfirmAction);
},_confirmRecurrenceActionOkClick:function(e){
var _16=this._editSeriesRadio.checked;
this._removeConfirmAction(e);
this._args.OnConfirm(_16,this._args);
e.preventDefault();
e.stopPropagation();
},ConfirmDelete:function(_17){
localization=this._scheduler.get_localization();
var _18=localization.ConfirmDeleteTitle;
var _19=localization.ConfirmDeleteText;
var d=document;
this._args=_17;
var _1b=this._createDialog(_18);
if(!_1b){
return;
}
var h2=_1b.appendChild(d.createElement("h2"));
h2.appendChild(d.createTextNode(_19));
this._createButtons(_1b,this._confirmDeleteOkClick,this._removeConfirmAction);
},_confirmDeleteOkClick:function(e){
var _1e=false;
this._removeConfirmAction(e);
this._args.OnConfirm(_1e,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(_20){
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 _22=this._recurrenceDialogWrapper.appendChild(d.createElement("div"));
_22.className="rsModalContainer";
_22.onselectstart=function(){
return false;
};
_22.style.height=this._schedulerDomElement.offsetHeight+"px";
$telerik.setOpacity(_22,0.4);
var _23=this._recurrenceDialogWrapper.appendChild(d.createElement("div"));
_23.className="rsConfirmation";
_23.style.top=(this._schedulerDomElement.offsetHeight-_23.offsetHeight)/2+"px";
_23.style.left=(this._schedulerDomElement.offsetWidth-_23.offsetWidth)/2+"px";
_23.style.display="block";
var h1=_23.appendChild(d.createElement("h1"));
h1.appendChild(d.createTextNode(_20));
return _23;
},_createButtons:function(_25,_26,_27){
localization=this._scheduler.get_localization();
var OK=localization.ConfirmOK;
var _29=localization.ConfirmCancel;
var d=document;
var _2b=_25.appendChild(d.createElement("div"));
_2b.className="rsButtonContainer";
this._btnOk=_2b.appendChild(d.createElement("a"));
this._btnOk.className="rsDialogButton";
this._btnOk.appendChild(d.createTextNode(OK));
this._btnOk.href="#";
this._btnOk.focus();
$addHandlers(this._btnOk,{"click":_26},this);
this._btnCancel=_2b.appendChild(d.createElement("a"));
this._btnCancel.className="rsDialogButton";
this._btnCancel.appendChild(d.createTextNode(_29));
this._btnCancel.href="#";
$addHandlers(this._btnCancel,{"click":_27},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(_1){
this._key=_1.key;
this._type=_1.type;
this._text=_1.text;
this._internalKey=_1.internalKey;
this._available=_1.available;
};
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;
}};
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(_1){
var _2=this._array.length;
this.insert(_2,_1);
},insert:function(_3,_4){
Array.insert(this._array,_3,_4);
},remove:function(_5){
Array.remove(this._array,_5);
},removeAt:function(_6){
var _7=this.getAppointment(_6);
if(_7){
this.remove(_7);
}
},clear:function(){
this._array=new Array();
},get_count:function(){
return this._array.length;
},forEach:function(_8){
for(var i=0,_a=this.get_count();i<_a;i++){
_8(this.getResource(i));
}
},getResource:function(_b){
return this._array[_b];
},getResourcesByType:function(_c){
var _d=new Telerik.Web.UI.SchedulerResourceCollection();
this.forEach(function(_e){
if(_e.get_type()==_c){
_d.add(_e);
}
});
return _d;
}};
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(_1){
return this._data[_1];
},setAttribute:function(_2,_3){
this._add(_2,_3);
var _4={};
_4[_2]=_3;
},_add:function(_5,_6){
if(Array.indexOf(this._keys,_5)<0){
Array.add(this._keys,_5);
}
this._data[_5]=_6;
},removeAttribute:function(_7){
Array.remove(this._keys,_7);
delete this._data[_7];
},_load:function(_8){
for(var _9 in _8){
this._add(_9,_8[_9]);
}
},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(_1){
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");;