﻿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";
if(this._originalParent.parentNode==_13||_14){
if(this._domElement.parentNode!=this._originalParent){
this._originalParent.appendChild(this._domElement);
}
return;
}
var _1a=_15._activeModel.getTimeSlotFromDomElement(this._originalParent.parentNode);
var _1b=_15._activeModel.getTimeSlotFromDomElement(_13);
_17={Command:_19,AppointmentID:this._internalID,EditSeries:false,SourceSlotIndex:_1a.get_index(),TargetSlotIndex:_1b.get_index()};
var _1c={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 _1d=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(_1c.Appointment,Telerik.Web.UI.RecurrenceAction.Move);
_15.raise_recurrenceActionDialogShowing(_1d);
if(_1d.get_cancel()){
var _1e=_1d.get_editSeries();
if(_1e!==null){
_1c.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(_1e,_1c);
}else{
this._onAppointmentMoveAbortCallback(_1c);
}
}else{
_15._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Move,_1c);
}
}else{
_1c.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(false,_1c);
}
},_onAppointmentMoveCallback:function(_1f,_20){
if(_20.CallbackIsCalledFromDialog){
var _21=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(_20.Appointment,Telerik.Web.UI.RecurrenceAction.Move,_1f);
_20.Scheduler.raise_recurrenceActionDialogClosed(_21);
}
var _22=new Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs(_20.Appointment,_20.TargetSlot.get_startTime(),_1f,_20.TargetSlot);
_20.Scheduler.raiseEvent("appointmentMoveEnd",_22);
if(_22.get_cancel()==false){
_20.PostbackEvent.EditSeries=_1f;
_20.Scheduler.postback(_20.PostbackEvent);
}else{
_20.Appointment._abortDrag();
}
},_onAppointmentMoveAbortCallback:function(_23){
_23.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(_24){
var _25=this._array.length;
this.insert(_25,_24);
},insert:function(_26,_27){
Array.insert(this._array,_26,_27);
},remove:function(_28){
Array.remove(this._array,_28);
},removeAt:function(_29){
var _2a=this.getAppointment(_29);
if(_2a){
this.remove(_2a);
}
},clear:function(){
this._array=new Array();
},get_count:function(){
return this._array.length;
},getAppointment:function(_2b){
return this._array[_2b];
},indexOf:function(_2c){
return Array.indexOf(this._array,_2c);
},forEach:function(_2d){
for(var i=0,_2f=this.get_count();i<_2f;i++){
_2d(this.getAppointment(i));
}
},getAppointmentsInRange:function(_30,end){
var _32=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(_33){
var _34=_33.get_start();
var _35=_33.get_end();
if(_34<end&&_35>_30){
_32.add(_33);
}
});
return _32;
},getAppointmentsStartingInRange:function(_36,end){
var _38=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(_39){
var _3a=_39.get_start();
if(_3a>=_36&&_3a<end){
_38.add(_39);
}
});
return _38;
}};
Telerik.Web.UI.SchedulerAppointmentCollection.registerClass("Telerik.Web.UI.SchedulerAppointmentCollection");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointmentEventArgs=function(_3b){
Telerik.Web.UI.SchedulerAppointmentEventArgs.initializeBase(this);
this._appointment=_3b;
};
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(_3c){
Telerik.Web.UI.SchedulerAppointmentCancelEventArgs.initializeBase(this);
this._appointment=_3c;
};
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(_3d){
Telerik.Web.UI.SchedulerAppointmentClickEventArgs.initializeBase(this,[_3d]);
};
Telerik.Web.UI.SchedulerAppointmentClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentClickEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs=function(_3e,_3f,_40,_41){
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.initializeBase(this);
this._startTime=_3e;
this._isAllDay=_3f;
this._resource=_40;
this._targetSlot=_41;
};
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(_42){
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs.initializeBase(this,[_42]);
};
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs=function(_43,_44,_45){
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs.initializeBase(this,[_43]);
this._newTime=_44;
this._editingRecurringSeries=_45;
};
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(_46,_47){
Telerik.Web.UI.SchedulerAppointmentResizingEventArgs.initializeBase(this,[_46]);
this._targetSlot=_47;
};
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(_48,_49){
Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs.initializeBase(this,[_48]);
this._editingRecurringSeries=_49;
};
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(_4a){
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs.initializeBase(this,[_4a]);
};
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs=function(_4b,_4c){
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs.initializeBase(this,[_4b]);
this._editingRecurringSeries=_4c;
};
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(_4d){
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs.initializeBase(this,[_4d]);
};
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs=function(_4e,_4f){
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs.initializeBase(this,[_4e]);
this._targetSlot=_4f;
};
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(_50,_51,_52,_53){
Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs.initializeBase(this,[_50]);
this._targetSlot=_53;
this._newStartTime=_51;
this._editingRecurringSeries=_52;
};
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(_54,_55){
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs.initializeBase(this);
this._time=_54;
this._targetSlot=_55;
};
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(_56){
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs.initializeBase(this,[_56]);
};
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs=function(_57,_58){
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.initializeBase(this,[_57]);
this._recurrenceAction=_58;
this._editSeries=null;
};
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.prototype={get_recurrenceAction:function(){
return this._recurrenceAction;
},get_editSeries:function(){
return this._editSeries;
},set_editSeries:function(_59){
this._editSeries=_59;
}};
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs=function(_5a,_5b,_5c){
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs.initializeBase(this,[_5a]);
this._recurrenceAction=_5b;
this._editSeries=_5c;
};
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(_5d,_5e){
Telerik.Web.UI.SchedulerFormCreatedEventArgs.initializeBase(this,[_5d]);
this._formElement=_5e;
};
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(_5f,_60){
Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs.initializeBase(this,[_5f]);
this._domEvent=_60;
};
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(_61,_62,_63,_64){
Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs.initializeBase(this);
this._time=_61;
this._isAllDay=_62;
this._domEvent=_63;
this._targetSlot=_64;
};
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(_65){
Telerik.Web.UI.RadScheduler.initializeBase(this,[_65]);
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(_66){
var _67=$get(_66);
var _68=_67.offsetHeight;
var _69=_68;
var _6a=null;
var _6b=_67.childNodes;
var _6c=_6b.length;
for(var i=0;i<_6c;i++){
var _6e=_6b[i];
if(_6e.tagName&&_6e.tagName.toLowerCase()=="div"){
if(Sys.UI.DomElement.containsCssClass(_6e,"rsContent")){
_6a=_6e;
}else{
_69-=_6e.offsetHeight;
}
}
}
if(_6a!=null){
var _6f=$telerik.getPaddingBox(_6a).vertical;
var _70=$telerik.getBorderBox(_6a).vertical;
_69-=_6f+_70;
_69=Math.max(_69,50);
if(_69!=_6a.offsetHeight){
_6a.style.height=_69+"px";
}
}
var _71=$telerik.getElementByClassName(_67,"rsAllDayLastCell","td");
if(_71){
_71.firstChild.style.width=(Telerik.Web.UI.RadScheduler._getScrollBarWidth()-1)+"px";
}
var _72=$telerik.getElementByClassName(_67,"rsColumnHeaderLastCell","td");
if(_72){
_72.firstChild.style.width=(Telerik.Web.UI.RadScheduler._getScrollBarWidth()-1)+"px";
}
};
Telerik.Web.UI.RadScheduler._incrementTime=function(_73,_74,_75){
if(isNaN(_75)){
_75=0;
}
_73.setTime(_73.getTime()+(_74*3600000)+(_75*60000));
};
Telerik.Web.UI.RadScheduler._getScrollBarWidth=function(){
if(Telerik.Web.UI.RadScheduler._scrollbarWidth){
return Telerik.Web.UI.RadScheduler._scrollbarWidth;
}
var _76,_77=0;
var _78=document.createElement("div");
_78.style.position="absolute";
_78.style.top="-1000px";
_78.style.left="-1000px";
_78.style.width="100px";
_78.style.height="50px";
_78.style.overflow="hidden";
var _79=document.createElement("div");
_79.style.width="100%";
_79.style.height="200px";
_78.appendChild(_79);
document.body.appendChild(_78);
var _7a=_79.offsetWidth;
_78.style.overflow="auto";
var _7b=_79.offsetWidth;
Telerik.Web.UI.RadScheduler._scrollbarWidth=_7a-_7b;
if(Telerik.Web.UI.RadScheduler._scrollbarWidth<=0){
_79.style.width="300px";
_76=_78.offsetWidth;
_77=_78.clientWidth;
Telerik.Web.UI.RadScheduler._scrollbarWidth=_76-_77;
}
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 _7c=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);
this._initializeModelTables();
this._initializeDivs(_7c);
var _7d=$telerik.getFirstChildByTagName(_7c,"div",0);
if(_7d&&Sys.UI.DomElement.containsCssClass(_7d,"rsAdvancedEdit")){
this._advancedFormDiv=_7d;
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 _7e=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
if(_7e){
_7e.scrollTop=this.get_scrollTop();
}
this._fireFormCreated();
},dispose:function(){
var _7f=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");
},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());
}
}
},get_appointments:function(){
return this._appointments;
},set_appointments:function(_80){
this._appointments=new Telerik.Web.UI.SchedulerAppointmentCollection();
var _81=Sys.Serialization.JavaScriptSerializer.deserialize(_80);
for(var i=0;i<_81.length;i++){
var _83=new Telerik.Web.UI.SchedulerAppointment(_81[i],this);
this._appointments.add(_83);
}
},get_resources:function(){
return this._resources;
},set_resources:function(_84){
this._resources=new Telerik.Web.UI.SchedulerResourceCollection();
var _85=Sys.Serialization.JavaScriptSerializer.deserialize(_84);
for(var i=0;i<_85.length;i++){
var _87=new Telerik.Web.UI.SchedulerResource(_85[i]);
this._resources.add(_87);
}
},get_firstDayStart:function(){
return this._firstDayStart;
},set_firstDayStart:function(_88){
this._firstDayStart=Sys.Serialization.JavaScriptSerializer.deserialize(_88);
},get_currentAppointment:function(){
return this._currentAppointment;
},set_currentAppointment:function(_89){
var _8a=Sys.Serialization.JavaScriptSerializer.deserialize(_89);
this._currentAppointment=new Telerik.Web.UI.SchedulerAppointment(_8a,this,null);
},get_localization:function(){
return this._localization;
},set_localization:function(_8b){
this._localization=Sys.Serialization.JavaScriptSerializer.deserialize(_8b);
},get_scrollTop:function(){
return this._scrollTop;
},set_scrollTop:function(_8c){
this._scrollTop=_8c;
},get_displayDeleteConfirmation:function(){
return this._displayDeleteConfirmation;
},set_displayDeleteConfirmation:function(_8d){
this._displayDeleteConfirmation=_8d;
},get_displayRecurrenceActionDialogOnMove:function(){
return this._displayRecurrenceActionDialogOnMove;
},set_displayRecurrenceActionDialogOnMove:function(_8e){
this._displayRecurrenceActionDialogOnMove=_8e;
},get_shouldPostbackOnClick:function(){
return this._shouldPostbackOnClick;
},set_shouldPostbackOnClick:function(_8f){
this._shouldPostbackOnClick=_8f;
},get_overflowBehavior:function(){
return this._overflowBehavior;
},set_overflowBehavior:function(_90){
this._overflowBehavior=_90;
},get_readOnly:function(){
return this._readOnly;
},set_readOnly:function(_91){
this._readOnly=_91;
},get_selectedView:function(){
return this._selectedView;
},set_selectedView:function(_92){
this._selectedView=_92;
},get_minutesPerRow:function(){
return this._minutesPerRow;
},set_minutesPerRow:function(_93){
this._minutesPerRow=_93;
},get_postBackReference:function(){
return this._postBackReference;
},set_postBackReference:function(_94){
this._postBackReference=_94;
},get_allowEdit:function(){
return this._allowEdit;
},set_allowEdit:function(_95){
this._allowEdit=_95;
},get_allowDelete:function(){
return this._allowDelete;
},set_allowDelete:function(_96){
this._allowDelete=_96;
},get_allowInsert:function(){
return this._allowInsert;
},set_allowInsert:function(_97){
this._allowInsert=_97;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_98){
this._attributes._load(_98);
},getAppointmentDomElement:function(_99){
while(_99&&!Sys.UI.DomElement.containsCssClass(_99,"rsApt")){
_99=_99.parentNode;
}
return _99;
},getAppointmentFromDomElement:function(_9a){
if(!_9a){
return null;
}
var _9b=this.getAppointmentDomElement(_9a);
var _9c=this.get_appointments();
for(var i=0;i<_9c.get_count();i++){
var _9e=_9c.getAppointment(i);
if(!_9e._domElement){
continue;
}
for(var _9f=0;_9f<_9e._domElements.length;_9f++){
if(_9b.id==_9e._domElements[_9f]){
return _9e;
}
}
}
return null;
},_fireFormCreated:function(){
if(this._shouldFireFormCreated){
var _a0=this.get_element();
if(this._inlineFormDiv){
_a0=this._inlineFormDiv;
}else{
if(this._advancedFormDiv){
_a0=this._advancedFormDiv;
}
}
var _a1=new Telerik.Web.UI.SchedulerFormCreatedEventArgs(this.get_currentAppointment(),_a0);
this.raise_formCreated(_a1);
}
},_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(_a3){
var _a4=_a3.getElementsByTagName("div");
var _a5=_a4.length;
for(var i=0;i<_a5;i++){
var _a7=_a4[i];
if(Sys.UI.DomElement.containsCssClass(_a7,"rsAptEdit")){
this._inlineFormDiv=_a7;
var _a8=_a7.getElementsByTagName("textarea")[0];
if(_a8){
window.setTimeout(function(){
if(_a8&&_a8.focus&&_a8.parentNode){
_a8.focus();
}
},500);
}
}
}
if(this.get_overflowBehavior()==1){
this.repaint();
}
},_onAppointmentClick:function(e){
var _aa=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_aa.Selected){
this._editAppointmentInline(_aa);
return;
}
var _ab=new Telerik.Web.UI.SchedulerAppointmentClickEventArgs(_aa);
this.raise_appointmentClick(_ab);
if(this.get_shouldPostbackOnClick()){
var _ac={Command:"Click",AppointmentID:_aa._internalID,EditSeries:false};
this.postback(_ac);
return;
}
if(this._selectedAppointment){
this._selectedAppointment._unselect();
}
_aa._select();
this._selectedAppointment=_aa;
},_onAppointmentContextMenu:function(e){
var _ae=this.getAppointmentFromDomElement(e.eventMapTarget);
var _af=new Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs(_ae,e);
this.raise_appointmentContextMenu(_af);
},_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(_b2){
var _b3=_b2;
while(_b3.tagName.toLowerCase()!="th"){
_b3=_b3.parentNode;
}
return _b3;
},_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(_b6){
var _b7=_b6.parentNode;
var _b8=_b7.parentNode;
while(_b8.tagName.toLowerCase()!="table"){
_b8=_b8.parentNode;
}
var _b9=_b8.rows[_b7.rowIndex+1];
var _ba=null;
if(_b9){
var _bb=_b9.cells.length;
var _bc=_b7.cells.length;
if(_bb==_bc){
_ba=_b9.cells[_b6.cellIndex];
}else{
if(_bb<_bc){
_ba=_b9.cells[_b6.cellIndex-1];
}else{
_ba=_b9.cells[_b6.cellIndex+1];
}
}
}
return _ba;
},_onRowMouseOut:function(e){
try{
var _be=e.rawEvent.relatedTarget?e.rawEvent.relatedTarget:e.rawEvent.toElement;
if(!_be||!this._currentHoverCell||$telerik.isDescendant(this._currentHoverDiv,_be)){
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 _c1=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _c2=(_c1.get_allowEdit()!=null)?_c1.get_allowEdit():this.get_allowEdit();
if(!_c2){
return;
}
var _c3=new Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs(_c1);
this.raise_appointmentResizeStart(_c3);
if(_c3.get_cancel()==false){
this._resizingState.resizing=true;
this._resizingState.resizingAppointment=_c1;
this._resizingState.resizingAppointmentDuration=_c1._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 _c5=this._resizingState.resizingElement.parentNode.parentNode;
var _c6=10;
var _c7=this._getCellFromCoordinates(e.clientX,e.clientY-_c6);
if(!_c7){
return;
}
var _c8=this._activeModel.getTimeSlotFromDomElement(_c7);
var _c9=new Telerik.Web.UI.SchedulerAppointmentResizingEventArgs(this._resizingState.resizingAppointment,_c8);
this.raise_appointmentResizing(_c9);
if(_c9.get_cancel()){
return;
}
var _ca=_c5.offsetHeight;
var _cb=_c7.parentNode.rowIndex-_c5.parentNode.rowIndex;
var _cc=Math.max(1,(_cb+1))*_ca;
var _cd=_c5.parentNode.parentNode.parentNode;
var _ce=_c7.parentNode.parentNode.parentNode;
if(_cd!=_ce){
return;
}
var _cf=parseInt(this._resizingState.resizingElement.style.paddingBottom);
_cf=isNaN(_cf)?0:_cf;
this._resizingState.resizingElement.style.height=(_cc-_cf)+"px";
this._fixIEBottom($telerik.getElementByClassName(this._resizingState.resizingElement,"rsAptBottom","div"));
this._keepElementInView(this._resizingState.resizingElement,true);
},_onSelectStart:function(e){
return false;
},_findResizeTargetSlot:function(_d1){
var _d2=_d1.parentNode.parentNode.offsetHeight;
var _d3=Math.ceil(_d1.offsetHeight/_d2);
var _d4=_d1.parentNode.parentNode;
var _d5=_d4.parentNode;
var _d6=_d5.rowIndex+_d3-1;
_d6=Math.min(_d6,_d5.parentNode.rows.length-1);
var _d7=_d5.parentNode.rows[_d6];
var _d8=_d7.cells[_d4.cellIndex];
return this._activeModel.getTimeSlotFromDomElement(_d8);
},_onResizeGripMouseUp:function(e){
if(!this._resizingState.resizingElement){
return;
}
var _da=this._findResizeTargetSlot(this._resizingState.resizingElement);
var _db=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _dc=this._activeModel.getTimeSlotFromDomElement(_db.get_element());
var _dd={OnConfirm:this._onAppointmentResizeCallback,OnAbort:this._onAppointmentResizeAbortCallback,Scheduler:this,Appointment:_db,SourceSlotIndex:_dc.get_index(),TargetSlotIndex:_da.get_index(),ResizingAppointmentDuration:this._resizingState.resizingAppointmentDuration,CallbackIsCalledFromDialog:true};
if(_db._recurrenceState==1||_db._recurrenceState==2){
var _de=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(_dd.Appointment,Telerik.Web.UI.RecurrenceAction.Resize);
this.raise_recurrenceActionDialogShowing(_de);
if(_de.get_cancel()){
var _df=_de.get_editSeries();
if(_df!==null){
_dd.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(_df,_dd);
}else{
this._onAppointmentResizeAbortCallback(_dd);
}
}else{
this._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Resize,_dd);
}
}else{
_dd.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(false,_dd);
}
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(_e0,_e1){
if(_e1.CallbackIsCalledFromDialog){
var _e2=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(_e1.Appointment,Telerik.Web.UI.RecurrenceAction.Resize,_e0);
_e1.Scheduler.raise_recurrenceActionDialogClosed(_e2);
}
var _e3=new Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs(_e1.Appointment,_e1.UpdatedEndDate,_e0);
_e1.Scheduler.raise_appointmentResizeEnd(_e3);
if(_e3.get_cancel()==false){
var _e4={Command:"Resize",AppointmentID:_e1.Appointment._internalID,SourceSlotIndex:_e1.SourceSlotIndex,TargetSlotIndex:_e1.TargetSlotIndex,EditSeries:_e0};
_e1.Scheduler.postback(_e4);
}else{
_e1.Appointment._setDuration(_e1.ResizingAppointmentDuration);
}
},_onAppointmentResizeAbortCallback:function(_e5){
_e5.Appointment._setDuration(_e5.ResizingAppointmentDuration);
},_onResizeGripMouseClick:function(e){
e.stopPropagation();
},_onResizeGripMouseOver:function(e){
e.target.style.cursor="s-resize";
e.stopPropagation();
},_fixIEBottom:function(_e8){
if($telerik.isIE6){
if(_e8.parentNode.parentNode.offsetHeight%2!=0){
_e8.style.bottom="-1px";
}else{
_e8.style.bottom="0px";
}
}
},_initializeModelTables:function(){
if(!this._modelTables){
this._modelTables=new Array();
var _e9=this.get_element().getElementsByTagName("table");
for(var i=0;i<_e9.length;i++){
var _eb=_e9[i];
if(Sys.UI.DomElement.containsCssClass(_eb,"rsContentTable")||Sys.UI.DomElement.containsCssClass(_eb,"rsAllDayTable")||Sys.UI.DomElement.containsCssClass(_eb,"rsTimelineTable")){
_eb.targetRect=$telerik.getBounds(_eb);
var _ec=_eb.rows[0].cells[0];
_eb.cellWidth=_ec.offsetWidth;
_eb.cellHeight=_ec.offsetHeight;
Array.add(this._modelTables,_eb);
}
}
}
return this._modelTables;
},_getCellFromCoordinates:function(_ed,_ee){
var _ef=this._modelTables;
var _f0=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _f1=$telerik.getScrollOffset(_f0,true);
for(var i=0,_f3=_ef.length;i<_f3;i++){
var x=_ed+_f1.x;
var y=_ee+_f1.y;
var _f6=_ef[i];
var _f7=_f6.targetRect;
var _f8=_f7.y+_f7.height;
var _f9=_f7.x+_f7.width;
if(x>=_f7.x&&x<=_f9&&y>=_f7.y&&y<=_f8){
var _fa=parseInt((y-_f7.y)/_f6.cellHeight);
_fa=Math.min(_f6.rows.length-1,Math.max(0,_fa));
var _fb=parseInt((x-_f7.x)/_f6.cellWidth);
_fb=Math.min(_f6.rows[_fa].cells.length-1,Math.max(0,_fb));
return _f6.rows[_fa].cells[_fb];
}
}
return null;
},_onDocumentMouseMove:function(e){
if(this._dragging&&this._draggingAppointment){
var _fd=this._getCellFromCoordinates(e.clientX,e.clientY-this._draggingOffset);
if(!_fd||_fd.firstChild==this._draggingAppointment._domElement.parentNode){
return;
}
if(_fd.firstChild.nodeType==3){
_fd.removeChild(_fd.firstChild);
var _fe=this._draggingAppointment._domElement.parentNode.cloneNode(false);
_fe.style.zIndex=_fd.parentNode.parentNode.rows.length-_fd.parentNode.rowIndex;
if($telerik.isFirefox){
_fe.style.height=_fd.clientHeight+"px";
}
_fd.appendChild(_fe);
}
if(this.get_selectedView()!=Telerik.Web.UI.SchedulerViewType.MonthView){
_fd.firstChild.appendChild(this._draggingAppointment._domElement);
}else{
if(_fd.childNodes[1]){
_fd.childNodes[1].appendChild(this._draggingAppointment._domElement);
}
}
var _ff=this._activeModel.getTimeSlotFromDomElement(_fd);
var args=new Telerik.Web.UI.SchedulerAppointmentMovingEventArgs(this._draggingAppointment,_ff);
this.raiseEvent("appointmentMoving",args);
if(args.get_cancel()){
this._abortDrag(e);
}else{
if(!_ff.get_isAllDay()){
this._keepElementInView(this._draggingAppointment._domElement);
}
}
return;
}
},_keepElementInView:function(_101,_102){
var _103=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _104=this._getRelativeOffsetTop(_101,_103);
var _105=_101.offsetHeight;
var _106=_104+_105;
var _107=_103.clientHeight+_103.scrollTop;
var _108=_101.parentNode.parentNode.offsetHeight;
if(!_102&&_104<_103.scrollTop){
_103.scrollTop=_104;
}
if(_106>_107){
var _109=_103.scrollTop+(_106-_107);
if((_103.clientHeight+_109)>_103.scrollHeight){
return;
}
if(!_102&&_109>_104){
_109=_104;
}
_103.scrollTop=_109;
}
if(_102&&(_106-_108)<_103.scrollTop){
_103.scrollTop=_106-_108;
}
},_getRelativeOffsetTop:function(_10a,_10b){
var _10c=_10a.offsetParent;
var _10d=_10a.offsetTop;
while(_10c!=_10b){
_10d+=_10c.offsetTop;
if(!_10c.offsetParent){
break;
}
_10c=_10c.offsetParent;
}
return _10d;
},_startDrag:function(e){
if(this.get_readOnly()){
return;
}
var _10f=this.getAppointmentFromDomElement(e.eventMapTarget);
var _110=(_10f.get_allowEdit()!=null)?_10f.get_allowEdit():this.get_allowEdit();
if(!_110){
return;
}
var _111=new Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs(_10f);
this.raiseEvent("appointmentMoveStart",_111);
if(_111.get_cancel()){
return;
}
$addHandler(document,"selectstart",this._onSelectStartDelegate);
$addHandler(document,"mouseup",this._onDocMouseUpDelegate);
$addHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._draggingAppointment=_10f;
this._dragging=true;
var _112=this._draggingAppointment.get_element();
var _113=$telerik.getLocation(_112);
if($telerik.isFirefox||$telerik.isSafari){
var _114=$telerik.getScrollOffset(_112,true);
_113.x-=_114.x;
_113.y-=_114.y;
if($telerik.isFirefox){
_113.x+=document.body.parentNode.scrollLeft;
_113.y+=document.body.parentNode.scrollTop;
}else{
_113.x+=document.body.scrollLeft;
_113.y+=document.body.scrollTop;
}
}
var _115=$telerik.getLocation(this._getCellFromCoordinates(e.clientX,e.clientY));
var _116=e.clientY-_113.y;
var _117=e.clientY-_115.y;
this._draggingOffset=_116-_117;
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView||this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.TimelineView){
this._draggingOffset=0;
}
_10f._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,_11c){
if(this._dragging){
$removeHandler(document,"selectstart",this._onSelectStartDelegate);
$removeHandler(document,"mouseup",this._onDocMouseUpDelegate);
$removeHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
if(!_11c&&this._draggingAppointment._domElement.parentNode&&this._draggingAppointment._domElement.parentNode.parentNode){
var _11d=this._draggingAppointment._domElement.parentNode.parentNode;
this._draggingAppointment._endDrag(_11d);
}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 _11f=this.getAppointmentFromDomElement(e.eventMapTarget);
var _120=new Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs(_11f);
this.raise_appointmentDoubleClick(_120);
this._editAppointmentInline(_11f);
e.stopPropagation();
},_editAppointmentInline:function(_121){
if(this.get_readOnly()){
return;
}
if(_121){
var _122=(_121.get_allowEdit()!=null)?_121.get_allowEdit():this.get_allowEdit();
if(!_122){
return;
}
var args={OnConfirm:this._onAppointmentEditCallback,Scheduler:this,Appointment:_121,CallbackIsCalledFromDialog:true};
if(_121._recurrenceState==1||_121._recurrenceState==2||_121._recurrenceState==3){
var _124=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Edit);
this.raise_recurrenceActionDialogShowing(_124);
if(_124.get_cancel()){
var _125=_124.get_editSeries();
if(_125!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(_125,args);
}
}else{
this._recurrenceActionDialog.ConfirmRecurrenceAction(Telerik.Web.UI.RecurrenceAction.Edit,args);
}
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(false,args);
}
}
},_onAppointmentEditCallback:function(_126,args){
if(args.CallbackIsCalledFromDialog){
var _128=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Edit,_126);
args.Scheduler.raise_recurrenceActionDialogClosed(_128);
}
if(!this._editing){
var _129=new Telerik.Web.UI.SchedulerAppointmentEditingEventArgs(args.Appointment,_126);
args.Scheduler.raise_appointmentEditing(_129);
if(_129.get_cancel()==false){
this._editing=true;
var _12a={Command:"Edit",AppointmentID:args.Appointment._internalID,EditSeries:_126};
args.Scheduler.postback(_12a);
}
}
},_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 _12c=this._getCellTimeFromDomElement(e.eventMapTarget);
var _12d={Command:"SwitchToSelectedDay",StartDate:_12c};
this.postback(_12d);
},_onAppointmentMouseOver:function(e){
if(this._resizingState.resizing||this._dragging){
e.stopPropagation();
return;
}
var _12f=this.getAppointmentDomElement(e.eventMapTarget);
var _130=this.getAppointmentFromDomElement(_12f);
var _131=(_130.get_allowDelete()!=null)?_130.get_allowDelete():this.get_allowDelete();
if(!_131){
return;
}
this._hoveredAppointmentElement=_12f;
var _132=$telerik.getElementByClassName(_12f,"rsAptDelete","a");
if(_132){
_132.style.visibility="visible";
}
},_onAppointmentMouseOut:function(e){
var _134=e.rawEvent.relatedTarget?e.rawEvent.relatedTarget:e.rawEvent.toElement;
if(!_134||$telerik.isDescendant(this._hoveredAppointmentElement,_134)){
return;
}else{
var _135=this.getAppointmentDomElement(e.eventMapTarget);
var _136=$telerik.getElementByClassName(_135,"rsAptDelete","a");
if(_136){
_136.style.visibility="hidden";
}
}
},_getCellCoordinates:function(_137){
while(_137&&(_137.tagName.toLowerCase()!="td")){
_137=_137.parentNode;
}
if(_137){
var _138=_137.cellIndex;
var _139=_137.parentNode.rowIndex;
return {cellIndex:_138,rowIndex:_139};
}
return -1;
},_getCellTimeFromDomElement:function(_13a){
var _13b=new Date(this.get_firstDayStart().getTime());
var _13c=this._getCellCoordinates(_13a);
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView){
var _13d=24*7*_13c.rowIndex;
var _13e=24*_13c.cellIndex;
Telerik.Web.UI.RadScheduler._incrementTime(_13b,_13d+_13e);
}else{
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.ResourceView){
var _13f=_13c.rowIndex*this.get_minutesPerRow();
Telerik.Web.UI.RadScheduler._incrementTime(_13b,0,_13f);
}else{
var _13f=_13c.rowIndex*this.get_minutesPerRow();
Telerik.Web.UI.RadScheduler._incrementTime(_13b,24*_13c.cellIndex,_13f);
}
}
return _13b;
},_onCellClick:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _142=new Telerik.Web.UI.SchedulerTimeSlotClickEventArgs(slot.get_startTime(),slot);
this.raise_timeSlotClick(_142);
},_onCellContextMenu:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _145=new Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs(slot.get_startTime(),slot.get_isAllDay(),e,slot);
this.raise_timeSlotContextMenu(_145);
},_onCellDoubleClick:function(e){
if(!this.get_readOnly()&&this.get_allowInsert()){
var _147=null;
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.ResourceView&&this.get_resources()){
var _148=this._getCellCoordinates(e.eventMapTarget).cellIndex;
_147=this.get_resources()[_148];
}
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _14a=new Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs(slot.get_startTime(),slot.get_isAllDay(),_147,slot);
this.raise_appointmentInserting(_14a);
if(_14a.get_cancel()==false){
var _14b={Command:"Insert",AppointmentID:-1,TargetSlotIndex:slot.get_index()};
if(_147){
_14b.ResourceKey=_147.internalKey;
}
this.postback(_14b);
}
}
e.stopPropagation();
},_onAppointmentDeleteClick:function(e){
if(!this.get_readOnly()){
var _14d=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_14d){
var args={OnConfirm:this._onAppointmentDeleteCallback,Scheduler:this,Appointment:_14d,CallbackIsCalledFromDialog:true};
if(_14d._recurrenceState==1||_14d._recurrenceState==2||_14d._recurrenceState==3){
var _14f=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Delete);
this.raise_recurrenceActionDialogShowing(_14f);
if(_14f.get_cancel()){
var _150=_14f.get_editSeries();
if(_150!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(_150,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(_151,args){
if(args.CallbackIsCalledFromDialog){
var _153=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Delete,_151);
args.Scheduler.raise_recurrenceActionDialogClosed(_153);
}
var _154=new Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs(args.Appointment,_151);
args.Scheduler.raise_appointmentDeleting(_154);
if(_154.get_cancel()==false){
var _155={Command:"Delete",AppointmentID:args.Appointment._internalID,EditSeries:_151};
args.Scheduler.postback(_155);
}
},_onPreviousDayClick:function(e){
var _157=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_157){
var _158={Command:"GoToPrevious",AppointmentID:_157._internalID};
this.postback(_158);
}
e.stopPropagation();
e.preventDefault();
},_onNextDayClick:function(e){
var _15a=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_15a){
var _15b={Command:"GoToNext",AppointmentID:_15a._internalID};
this.postback(_15b);
}
e.stopPropagation();
e.preventDefault();
},_onDayViewTabClick:function(e){
var _15d={Command:"SwitchToDayView"};
this.postback(_15d);
e.stopPropagation();
e.preventDefault();
},_onWeekViewTabClick:function(e){
var _15f={Command:"SwitchToWeekView"};
this.postback(_15f);
e.stopPropagation();
e.preventDefault();
},_onMonthViewTabClick:function(e){
var _161={Command:"SwitchToMonthView"};
this.postback(_161);
e.stopPropagation();
e.preventDefault();
},_onTimelineViewTabClick:function(e){
var _163={Command:"SwitchToTimelineView"};
this.postback(_163);
e.stopPropagation();
e.preventDefault();
},_onPreviousSchedulerDayClick:function(e){
var _165={Command:"NavigateToPreviousPeriod"};
this.postback(_165);
e.stopPropagation();
e.preventDefault();
},_onNextSchedulerDayClick:function(e){
var _167={Command:"NavigateToNextPeriod"};
this.postback(_167);
e.stopPropagation();
e.preventDefault();
},_onTodayClick:function(e){
var _169={Command:"GoToToday"};
this.postback(_169);
e.stopPropagation();
e.preventDefault();
},_onFullTimeLinkClick:function(e){
var _16b={Command:"SwitchFullTime"};
this.postback(_16b);
e.stopPropagation();
e.preventDefault();
},postback:function(args){
var _16d=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
args.ScrollTop=_16d.scrollTop;
this._inPostback=true;
var _16e=this.get_postBackReference().replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(args));
eval(_16e);
},_getElementIndex:function(_16f,_170){
for(var i=0;i<_16f.length;i++){
if(_16f[i]===_170){
return i;
}
}
return -1;
},add_appointmentClick:function(_172){
this.get_events().addHandler("AppointmentClick",_172);
},remove_appointmentClick:function(_173){
this.get_events().removeHandler("AppointmentClick",_173);
},raise_appointmentClick:function(args){
this.raiseEvent("AppointmentClick",args);
},add_appointmentInserting:function(_175){
this.get_events().addHandler("AppointmentInserting",_175);
},remove_appointmentInserting:function(_176){
this.get_events().removeHandler("AppointmentInserting",_176);
},raise_appointmentInserting:function(_177){
this.raiseEvent("AppointmentInserting",_177);
},add_appointmentDoubleClick:function(_178){
this.get_events().addHandler("AppointmentDoubleClick",_178);
},remove_appointmentDoubleClick:function(_179){
this.get_events().removeHandler("AppointmentDoubleClick",_179);
},raise_appointmentDoubleClick:function(_17a){
this.raiseEvent("AppointmentDoubleClick",_17a);
},add_appointmentResizeStart:function(_17b){
this.get_events().addHandler("AppointmentResizeStart",_17b);
},remove_appointmentResizeStart:function(_17c){
this.get_events().removeHandler("AppointmentResizeStart",_17c);
},raise_appointmentResizeStart:function(args){
this.raiseEvent("AppointmentResizeStart",args);
},add_appointmentResizeEnd:function(_17e){
this.get_events().addHandler("AppointmentResizeEnd",_17e);
},remove_appointmentResizeEnd:function(_17f){
this.get_events().removeHandler("AppointmentResizeEnd",_17f);
},raise_appointmentResizeEnd:function(args){
this.raiseEvent("AppointmentResizeEnd",args);
},add_appointmentResizing:function(_181){
this.get_events().addHandler("AppointmentResizing",_181);
},remove_appointmentResizing:function(_182){
this.get_events().removeHandler("AppointmentResizing",_182);
},raise_appointmentResizing:function(args){
this.raiseEvent("AppointmentResizing",args);
},add_appointmentDeleting:function(_184){
this.get_events().addHandler("AppointmentDeleting",_184);
},remove_appointmentDeleting:function(_185){
this.get_events().removeHandler("AppointmentDeleting",_185);
},raise_appointmentDeleting:function(args){
this.raiseEvent("AppointmentDeleting",args);
},add_timeSlotClick:function(_187){
this.get_events().addHandler("TimeSlotClick",_187);
},remove_timeSlotClick:function(_188){
this.get_events().removeHandler("TimeSlotClick",_188);
},raise_timeSlotClick:function(args){
this.raiseEvent("TimeSlotClick",args);
},add_appointmentEditing:function(_18a){
this.get_events().addHandler("AppointmentEditing",_18a);
},remove_appointmentEditing:function(_18b){
this.get_events().removeHandler("AppointmentEditing",_18b);
},raise_appointmentEditing:function(args){
this.raiseEvent("AppointmentEditing",args);
},add_appointmentMoveStart:function(_18d){
this.get_events().addHandler("appointmentMoveStart",_18d);
},remove_appointmentMoveStart:function(_18e){
this.get_events().removeHandler("appointmentMoveStart",_18e);
},add_appointmentMoving:function(_18f){
this.get_events().addHandler("appointmentMoving",_18f);
},remove_appointmentMoving:function(_190){
this.get_events().removeHandler("appointmentMoving",_190);
},add_appointmentMoveEnd:function(_191){
this.get_events().addHandler("appointmentMoveEnd",_191);
},remove_appointmentMoveEnd:function(_192){
this.get_events().removeHandler("appointmentMoveEnd",_192);
},add_recurrenceActionDialogShowing:function(_193){
this.get_events().addHandler("RecurrenceActionDialogShowing",_193);
},remove_recurrenceActionDialogShowing:function(_194){
this.get_events().removeHandler("RecurrenceActionDialogShowing",_194);
},raise_recurrenceActionDialogShowing:function(args){
this.raiseEvent("RecurrenceActionDialogShowing",args);
},add_recurrenceActionDialogClosed:function(_196){
this.get_events().addHandler("RecurrenceActionDialogClosed",_196);
},remove_recurrenceActionDialogClosed:function(_197){
this.get_events().removeHandler("RecurrenceActionDialogClosed",_197);
},raise_recurrenceActionDialogClosed:function(args){
this.raiseEvent("RecurrenceActionDialogClosed",args);
},add_formCreated:function(_199){
this.get_events().addHandler("FormCreated",_199);
},remove_formCreated:function(_19a){
this.get_events().removeHandler("FormCreated",_19a);
},raise_formCreated:function(args){
this.raiseEvent("FormCreated",args);
},add_appointmentContextMenu:function(_19c){
this.get_events().addHandler("AppointmentContextMenu",_19c);
},remove_appointmentContextMenu:function(_19d){
this.get_events().removeHandler("AppointmentContextMenu",_19d);
},raise_appointmentContextMenu:function(args){
this.raiseEvent("AppointmentContextMenu",args);
},add_timeSlotContextMenu:function(_19f){
this.get_events().addHandler("TimeSlotContextMenu",_19f);
},remove_timeSlotContextMenu:function(_1a0){
this.get_events().removeHandler("TimeSlotContextMenu",_1a0);
},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(_1a2){
this._schedulerDomElement=_1a2.get_element();
this._scheduler=_1a2;
this._recurrenceDialogWrapper=null;
this._args=null;
this._btnOk=null;
this._btnCancel=null;
};
Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton=function(id,name,_1a5,_1a6){
var _1a7;
if($telerik.isIE){
var html="<input type=\"radio\" ";
html+="id=\""+id+"\" ";
html+="name=\""+name+"\" ";
html+="value=\""+_1a5+"\" ";
if(_1a6){
html+="checked ";
}
html+="/>";
_1a7=document.createElement(html);
}else{
_1a7=document.createElement("input");
_1a7.id=id;
_1a7.type="radio";
_1a7.name=name;
_1a7.value=_1a5;
_1a7.checked=_1a6;
}
return _1a7;
};
Telerik.Web.UI.RecurrenceActionDialog.prototype={ConfirmRecurrenceAction:function(_1a9,args){
localization=this._scheduler.get_localization();
var _1ab;
var _1ac;
var _1ad;
switch(_1a9){
case Telerik.Web.UI.RecurrenceAction.Edit:
_1ab=localization.ConfirmRecurrenceEditTitle;
_1ac=localization.ConfirmRecurrenceEditOccurrence;
_1ad=localization.ConfirmRecurrenceEditSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Resize:
_1ab=localization.ConfirmRecurrenceResizeTitle;
_1ac=localization.ConfirmRecurrenceResizeOccurrence;
_1ad=localization.ConfirmRecurrenceResizeSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Delete:
_1ab=localization.ConfirmRecurrenceDeleteTitle;
_1ac=localization.ConfirmRecurrenceDeleteOccurrence;
_1ad=localization.ConfirmRecurrenceDeleteSeries;
break;
case Telerik.Web.UI.RecurrenceAction.Move:
_1ab=localization.ConfirmRecurrenceMoveTitle;
_1ac=localization.ConfirmRecurrenceMoveOccurrence;
_1ad=localization.ConfirmRecurrenceMoveSeries;
break;
}
var d=document;
this._args=args;
var _1af=this._createDialog(_1ab);
if(!_1af){
return;
}
var _1b0=_1af.appendChild(d.createElement("div"));
var _1b1=_1b0.appendChild(Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton("choiceOccurrenceSpan_0","choiceOccurrenceSpan","OpenOccurrence",true));
var _1b2=_1b0.appendChild(d.createElement("label"));
_1b2.htmlFor=_1b1.id;
_1b2.appendChild(d.createTextNode(_1ac));
var _1b3=_1af.appendChild(d.createElement("div"));
var _1b4=_1b3.appendChild(Telerik.Web.UI.RecurrenceActionDialog.CreateRadioButton("choiceOccurrenceSpan_1","choiceOccurrenceSpan","OpenSeries",false));
this._editSeriesRadio=_1b4;
var _1b5=_1b3.appendChild(d.createElement("label"));
_1b5.htmlFor=_1b4.id;
_1b5.appendChild(d.createTextNode(_1ad));
this._createButtons(_1af,this._confirmRecurrenceActionOkClick,this._removeConfirmAction);
},_confirmRecurrenceActionOkClick:function(e){
var _1b7=this._editSeriesRadio.checked;
this._removeConfirmAction(e);
this._args.OnConfirm(_1b7,this._args);
e.preventDefault();
e.stopPropagation();
},ConfirmDelete:function(args){
localization=this._scheduler.get_localization();
var _1b9=localization.ConfirmDeleteTitle;
var _1ba=localization.ConfirmDeleteText;
var d=document;
this._args=args;
var _1bc=this._createDialog(_1b9);
if(!_1bc){
return;
}
var h2=_1bc.appendChild(d.createElement("h2"));
h2.appendChild(d.createTextNode(_1ba));
this._createButtons(_1bc,this._confirmDeleteOkClick,this._removeConfirmAction);
},_confirmDeleteOkClick:function(e){
var _1bf=false;
this._removeConfirmAction(e);
this._args.OnConfirm(_1bf,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(_1c1){
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 _1c3=this._recurrenceDialogWrapper.appendChild(d.createElement("div"));
_1c3.className="rsModalContainer";
_1c3.onselectstart=function(){
return false;
};
_1c3.style.height=this._schedulerDomElement.offsetHeight+"px";
$telerik.setOpacity(_1c3,0.4);
var _1c4=this._recurrenceDialogWrapper.appendChild(d.createElement("div"));
_1c4.className="rsConfirmation";
_1c4.style.top=(this._schedulerDomElement.offsetHeight-_1c4.offsetHeight)/2+"px";
_1c4.style.left=(this._schedulerDomElement.offsetWidth-_1c4.offsetWidth)/2+"px";
_1c4.style.display="block";
var h1=_1c4.appendChild(d.createElement("h1"));
h1.appendChild(d.createTextNode(_1c1));
return _1c4;
},_createButtons:function(_1c6,_1c7,_1c8){
localization=this._scheduler.get_localization();
var OK=localization.ConfirmOK;
var _1ca=localization.ConfirmCancel;
var d=document;
var _1cc=_1c6.appendChild(d.createElement("div"));
_1cc.className="rsButtonContainer";
this._btnOk=_1cc.appendChild(d.createElement("a"));
this._btnOk.className="rsDialogButton";
this._btnOk.appendChild(d.createTextNode(OK));
this._btnOk.href="#";
this._btnOk.focus();
$addHandlers(this._btnOk,{"click":_1c7},this);
this._btnCancel=_1cc.appendChild(d.createElement("a"));
this._btnCancel.className="rsDialogButton";
this._btnCancel.appendChild(d.createTextNode(_1ca));
this._btnCancel.href="#";
$addHandlers(this._btnCancel,{"click":_1c8},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(_1cd){
this._key=_1cd.key;
this._type=_1cd.type;
this._text=_1cd.text;
this._internalKey=_1cd.internalKey;
this._available=_1cd.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(item){
var _1cf=this._array.length;
this.insert(_1cf,item);
},insert:function(_1d0,item){
Array.insert(this._array,_1d0,item);
},remove:function(item){
Array.remove(this._array,item);
},removeAt:function(_1d3){
var item=this.getAppointment(_1d3);
if(item){
this.remove(item);
}
},clear:function(){
this._array=new Array();
},get_count:function(){
return this._array.length;
},forEach:function(_1d5){
for(var i=0,_1d7=this.get_count();i<_1d7;i++){
_1d5(this.getResource(i));
}
},getResource:function(_1d8){
return this._array[_1d8];
},getResourcesByType:function(type){
var _1da=new Telerik.Web.UI.SchedulerResourceCollection();
this.forEach(function(_1db){
if(_1db.get_type()==type){
_1da.add(_1db);
}
});
return _1da;
}};
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,_1de){
this._add(key,_1de);
var _1df={};
_1df[key]=_1de;
},_add:function(key,_1e1){
if(Array.indexOf(this._keys,key)<0){
Array.add(this._keys,key);
}
this._data[key]=_1e1;
},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(_1e5){
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");


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();