Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RecurrenceState=function(){
};
Telerik.Web.UI.RecurrenceState.prototype={NotRecurring:0,Master:1,Occurrence:2,Exception:3};
Telerik.Web.UI.RecurrenceState.registerEnum("Telerik.Web.UI.RecurrenceState");
Telerik.Web.UI.SchedulerAppointment=function(_1,_2,_3){
this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection(this);
if(!_1){
return;
}
this._id=_1.id;
this._subject=_1.subject;
this._start=new Date(Date.parse(_1.start));
this._end=new Date(Date.parse(_1.end));
this._toolTip=_1.toolTip;
this._internalID=_1.internalID;
this._visible=_1.visible;
this._recurrenceState=_1.recurrenceState;
this._recurrenceParentID=_1.recurrenceParentID;
this._serializedResources=_1.resources;
this._resources=null;
this._domElements=_1.domElements;
this._domElement=null;
this._column=null;
this._allowEdit=null;
if(typeof (_1.allowEdit)!="undefined"){
this._allowEdit=_1.allowEdit;
}
this._allowDelete=null;
if(typeof (_1.allowDelete)!="undefined"){
this._allowDelete=_1.allowDelete;
}
this._radScheduler=_2;
this._oldZIndex=null;
this._originalParent=null;
if(typeof (_1.attributes)!="undefined"){
this._attributes._load(_1.attributes);
}
};
Telerik.Web.UI.SchedulerAppointment._incrementMilliseconds=function(_4,_5){
_4.setTime(_4.getTime()+_5);
};
Telerik.Web.UI.SchedulerAppointment.prototype={get_id:function(){
return this._id;
},get_subject:function(){
return this._subject;
},set_subject:function(_6){
this._subject=_6;
},get_start:function(){
return this._start;
},set_start:function(_7){
this._start=_7;
},get_end:function(){
return this._end;
},set_end:function(_8){
this._end=_8;
},get_duration:function(){
return this._end-this._start;
},get_toolTip:function(){
return this._toolTip;
},set_toolTip:function(_9){
this._toolTip=_9;
},get_radScheduler:function(){
return this._radScheduler;
},get_allowEdit:function(){
return this._allowEdit;
},set_allowEdit:function(_a){
this._allowEdit=_a;
},get_allowDelete:function(){
return this._allowDelete;
},set_allowDelete:function(_b){
this._allowDelete=_b;
},get_element:function(){
if(!this._domElement&&this._domElements.length>0){
this._domElement=$get(this._domElements[0]);
}
return this._domElement;
},get_attributes:function(){
return this._attributes;
},get_recurrenceState:function(){
return this._recurrenceState;
},get_recurrenceParentID:function(){
return this._recurrenceParentID;
},get_resources:function(){
if(!this._resources){
this._resources=new Telerik.Web.UI.SchedulerResourceCollection();
for(var _c in this._serializedResources){
var _d=this._serializedResources[_c];
if(_d.text){
this._resources.add(new Telerik.Web.UI.SchedulerResource(_d));
}else{
var _e=this.get_radScheduler().get_resources().getResourcesByType(_d.type);
var _f=this._resources;
_e.forEach(function(_10){
if(_10.get_key()==_d.key){
_f.add(_10);
}
});
}
}
}
return this._resources;
},edit:function(){
var _11=this.get_radScheduler();
if(_11){
_11.editAppointment(this);
}
},remove:function(){
var _12=this.get_radScheduler();
if(_12){
_12.deleteAppointment(this);
}
},_getColumn:function(){
return this._column;
},_setColumn:function(_13){
this._column=_13;
},_startDrag:function(){
var _14=this.get_element();
var _15=$telerik.getElementByClassName(_14,"rsAptOut","div");
var _16=this.get_radScheduler().get_element();
$telerik.setOpacity(_15,0.6);
_16.style.cursor="move";
this._oldZIndex=_14.style.zIndex;
_14.style.zIndex=999;
this._originalParent=_14.parentNode;
Sys.UI.DomElement.removeCssClass(_14,"rsWAppointmentDelete");
},_endDrag:function(_17){
this._finishDrag(_17,false);
},_abortDrag:function(){
this._finishDrag(null,true);
},_finishDrag:function(_18,_19){
var _1a=this.get_radScheduler();
var _18=this.get_element();
var _1b=$telerik.getElementByClassName(_18,"rsAptOut","div");
$telerik.setOpacity(_1b,1);
_18.style.zindex=this._oldZIndex;
var _1c=this.get_radScheduler().get_element();
if(_1c&&_1c.style){
this.get_radScheduler().get_element().style.cursor="";
}
var _1d;
var _1e="Move";
var _1f=_1a._activeModel.getTimeSlotFromDomElement(this._originalParent.parentNode);
var _20=_1a._activeModel.getTimeSlotFromDomElement(_18);
if((_1f.get_index()==_20.get_index())||_19){
if(_18.parentNode!=this._originalParent){
this._originalParent.appendChild(_18);
}
return;
}
_1d={Command:_1e,AppointmentID:this._internalID,EditSeries:false,SourceSlotIndex:_1f.get_index(),TargetSlotIndex:_20.get_index()};
var _21={OnConfirm:this._onAppointmentMoveCallback,OnAbort:this._onAppointmentMoveAbortCallback,Scheduler:this.get_radScheduler(),Appointment:this,TargetSlot:_20,PostbackEvent:_1d,CallbackIsCalledFromDialog:true};
if(_1a.get_displayRecurrenceActionDialogOnMove()&&(this._recurrenceState==1||this._recurrenceState==2)){
var _22=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(_21.Appointment,Telerik.Web.UI.RecurrenceAction.Move);
_1a.raise_recurrenceActionDialogShowing(_22);
if(_22.get_cancel()){
var _23=_22.get_editSeries();
if(_23!==null){
_21.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(_23,_21);
}else{
this._onAppointmentMoveAbortCallback(_21);
}
}else{
_1a._showRecurrenceActionDialog(Telerik.Web.UI.RecurrenceAction.Move,_21);
}
}else{
_21.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(false,_21);
}
},_onAppointmentMoveCallback:function(_24,_25){
if(_25.CallbackIsCalledFromDialog){
var _26=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(_25.Appointment,Telerik.Web.UI.RecurrenceAction.Move,_24);
_25.Scheduler.raise_recurrenceActionDialogClosed(_26);
}
var _27=new Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs(_25.Appointment,_25.TargetSlot.get_startTime(),_24,_25.TargetSlot);
_25.Scheduler.raiseEvent("appointmentMoveEnd",_27);
if(_27.get_cancel()==false){
_25.PostbackEvent.EditSeries=_24;
_25.Scheduler.postback(_25.PostbackEvent);
}else{
_25.Appointment._abortDrag();
}
},_onAppointmentMoveAbortCallback:function(_28){
_28.Appointment._abortDrag();
},_getWidthPercent:function(){
var _29=this._getColumn();
if(!_29){
return 100;
}
return _29.get_width();
}};
Telerik.Web.UI.SchedulerAppointment.registerClass("Telerik.Web.UI.SchedulerAppointment");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointmentCollection=function(_2a){
this._array=new Array();
this._scheduler=_2a;
};
Telerik.Web.UI.SchedulerAppointmentCollection.prototype={add:function(_2b){
var _2c=this._array.length;
this.insert(_2c,_2b);
},insert:function(_2d,_2e){
Array.insert(this._array,_2d,_2e);
if(this._scheduler){
this._scheduler._onAppointmentInserting(_2e);
}
},remove:function(_2f){
if(this._scheduler){
this._scheduler._onAppointmentRemove(_2f);
}
return Array.remove(this._array,_2f);
},removeAt:function(_30){
var _31=this.getAppointment(_30);
if(_31){
this.remove(_31);
}
},clear:function(){
if(this._scheduler){
this._scheduler._onAppointmentsClear();
}
this._array=new Array();
},get_count:function(){
return this._array.length;
},getAppointment:function(_32){
return this._array[_32];
},indexOf:function(_33){
return Array.indexOf(this._array,_33);
},forEach:function(_34){
for(var i=0,_36=this.get_count();i<_36;i++){
_34(this.getAppointment(i));
}
},getAppointmentsInRange:function(_37,end){
var _39=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(_3a){
var _3b=_3a.get_start();
var _3c=_3a.get_end();
if(_3b<end&&_3c>_37){
_39.add(_3a);
}
});
return _39;
},getAppointmentsStartingInRange:function(_3d,end){
var _3f=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(_40){
var _41=_40.get_start();
if(_41>=_3d&&_41<end){
_3f.add(_40);
}
});
return _3f;
},findByID:function(id){
var _43;
this.forEach(function(_44){
if(_44.get_id()==id){
_43=_44;
}
});
return _43;
}};
Telerik.Web.UI.SchedulerAppointmentCollection.registerClass("Telerik.Web.UI.SchedulerAppointmentCollection");
Type.registerNamespace("Telerik.Web.UI.SchedulerRendering");
Telerik.Web.UI.SchedulerRendering.Block=function(){
this._columns=new Array();
this._appointments=new Array();
this._start=null;
this._end=null;
};
Telerik.Web.UI.SchedulerRendering.Block.prototype={add:function(_45){
if(this._columns.length<1){
this._createColumn();
}
var _46=false;
for(var i=0;i<this._columns.length;i++){
if(this._columns[i].tryAdd(_45)){
_46=true;
break;
}
}
if(!_46){
var _48=this._createColumn();
_48.tryAdd(_45);
}
Array.insert(this._appointments,this._appointments.lenght,_45);
if(!this._start||this._start>_45.get_start()){
this._start=_45.get_start();
}
if(!this._end||this._end<_45.get_end()){
this._end=_45.get_end();
}
},remove:function(_49){
var _4a=Array.remove(this._appointments,_49);
if(!_4a){
return;
}
var _4b=_49._getColumn();
_4b.remove(_49);
if(_4b.get_appointments().get_count()==0){
Array.remove(this._columns,_4b);
}
},overlapsWith:function(_4c){
if(this._appointments.length==0){
return false;
}
return this._start<=_4c.get_end()&&this._end>_4c.get_start();
},_createColumn:function(){
var _4d=new Telerik.Web.UI.SchedulerRendering.Column(this);
var _4e=this._columns.length;
Array.insert(this._columns,_4e,_4d);
return _4d;
},get_columns:function(){
return this._columns;
}};
Telerik.Web.UI.SchedulerRendering.Block.registerClass("Telerik.Web.UI.SchedulerRendering.Block");
Type.registerNamespace("Telerik.Web.UI.SchedulerRendering");
Telerik.Web.UI.SchedulerRendering.BlockCollection=function(){
this._blocks=new Array();
};
Telerik.Web.UI.SchedulerRendering.BlockCollection.prototype={add:function(_4f){
var _50;
if(this._blocks.length==0){
_50=this._createBlock();
}else{
var _51=new Array();
for(var i=0;i<this._blocks.length;i++){
if(this._blocks[i].overlapsWith(_4f)){
Array.insert(_51,_51.length,this._blocks[i]);
}
}
if(_51.length==0){
_50=this._createBlock();
}else{
if(_51.length==1){
_50=_51[0];
}else{
_50=this._mergeBlocks(_51);
}
}
}
_50.add(_4f);
},remove:function(_53){
for(var i=0;i<this._blocks.length;i++){
this._blocks[i].remove(_53);
}
},_createBlock:function(){
var _55=new Telerik.Web.UI.SchedulerRendering.Block();
var _56=this._blocks.length;
Array.insert(this._blocks,_56,_55);
return _55;
},_mergeBlocks:function(_57){
var _58=_57[0];
for(var _59 in _57){
var _5a=_57[_59];
if(_5a==_58){
continue;
}
for(var _5b in _5a._appointments){
_58.add(_5a._appointments[_5b]);
}
Array.remove(this._blocks,_5a);
}
return _58;
}};
Telerik.Web.UI.SchedulerRendering.BlockCollection.registerClass("Telerik.Web.UI.SchedulerRendering.BlockCollection");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointmentEventArgs=function(_5c){
Telerik.Web.UI.SchedulerAppointmentEventArgs.initializeBase(this);
this._appointment=_5c;
};
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(_5d){
Telerik.Web.UI.SchedulerAppointmentCancelEventArgs.initializeBase(this);
this._appointment=_5d;
};
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(_5e){
Telerik.Web.UI.SchedulerAppointmentClickEventArgs.initializeBase(this,[_5e]);
};
Telerik.Web.UI.SchedulerAppointmentClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentClickEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs=function(_5f,_60,_61){
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.initializeBase(this);
this._startTime=_5f;
this._isAllDay=_60;
this._targetSlot=_61;
};
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.prototype={get_startTime:function(){
return this._startTime;
},get_isAllDay:function(){
return this._isAllDay;
},get_targetSlot:function(){
return this._targetSlot;
}};
Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs",Sys.CancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs=function(_62){
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs.initializeBase(this,[_62]);
};
Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs=function(_63,_64,_65){
Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs.initializeBase(this,[_63]);
this._newTime=_64;
this._editingRecurringSeries=_65;
};
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(_66,_67){
Telerik.Web.UI.SchedulerAppointmentResizingEventArgs.initializeBase(this,[_66]);
this._targetSlot=_67;
};
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(_68,_69){
Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs.initializeBase(this,[_68]);
this._editingRecurringSeries=_69;
};
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(_6a){
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs.initializeBase(this,[_6a]);
};
Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs=function(_6b,_6c){
Telerik.Web.UI.SchedulerAppointmentEditingEventArgs.initializeBase(this,[_6b]);
this._editingRecurringSeries=_6c;
};
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(_6d){
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs.initializeBase(this,[_6d]);
};
Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs=function(_6e,_6f){
Telerik.Web.UI.SchedulerAppointmentMovingEventArgs.initializeBase(this,[_6e]);
this._targetSlot=_6f;
};
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(_70,_71,_72,_73){
Telerik.Web.UI.SchedulerAppointmentMoveEndEventArgs.initializeBase(this,[_70]);
this._targetSlot=_73;
this._newStartTime=_71;
this._editingRecurringSeries=_72;
};
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(_74,_75,_76){
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs.initializeBase(this);
this._time=_74;
this._targetSlot=_75;
this._domEvent=_76;
};
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs.prototype={get_time:function(){
return this._time;
},get_targetSlot:function(){
return this._targetSlot;
},get_domEvent:function(){
return this._domEvent;
}};
Telerik.Web.UI.SchedulerTimeSlotClickEventArgs.registerClass("Telerik.Web.UI.SchedulerTimeSlotClickEventArgs",Sys.EventArgs);
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs=function(_77){
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs.initializeBase(this,[_77]);
};
Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs",Telerik.Web.UI.SchedulerAppointmentEventArgs);
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs=function(_78,_79){
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.initializeBase(this,[_78]);
this._recurrenceAction=_79;
this._editSeries=null;
};
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.prototype={get_recurrenceAction:function(){
return this._recurrenceAction;
},get_editSeries:function(){
return this._editSeries;
},set_editSeries:function(_7a){
this._editSeries=_7a;
}};
Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs",Telerik.Web.UI.SchedulerAppointmentCancelEventArgs);
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs=function(_7b,_7c,_7d){
Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs.initializeBase(this,[_7b]);
this._recurrenceAction=_7c;
this._editSeries=_7d;
};
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(_7e,_7f){
Telerik.Web.UI.SchedulerFormCreatedEventArgs.initializeBase(this,[_7e]);
this._formElement=_7f;
};
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(_80,_81){
Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs.initializeBase(this,[_80]);
this._domEvent=_81;
};
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(_82,_83,_84,_85){
Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs.initializeBase(this);
this._time=_82;
this._isAllDay=_83;
this._domEvent=_84;
this._targetSlot=_85;
};
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.SchedulerRendering");
Telerik.Web.UI.SchedulerRendering.Column=function(_86){
this._appointments=new Telerik.Web.UI.SchedulerAppointmentCollection();
this._block=_86;
};
Telerik.Web.UI.SchedulerRendering.Column.prototype={tryAdd:function(_87){
var _88=this._appointments.getAppointmentsInRange(_87.get_start(),_87.get_end());
if(_88.get_count()==0){
this._appointments.add(_87);
_87._setColumn(this);
return true;
}
return false;
},remove:function(_89){
var _8a=this._appointments.remove(_89);
if(_8a){
_89._setColumn(null);
}
},get_appointments:function(){
return this._appointments;
},get_block:function(){
return this._block;
},isLastColumn:function(){
var _8b=this.get_block().get_columns()[this.get_block().get_columns().length-1];
return _8b==this;
},get_width:function(){
if(this.isLastColumn()){
return Math.floor(100/this.get_block().get_columns().length)+100%this.get_block().get_columns().length;
}
return Math.floor(100/this.get_block().get_columns().length);
}};
Telerik.Web.UI.SchedulerRendering.Column.registerClass("Telerik.Web.UI.SchedulerRendering.Column");
Type.registerNamespace("Telerik.Web.UI.Scheduler");
Telerik.Web.UI.Scheduler.EventMap=function(){
this._owner=null;
this._element=null;
this._eventMap={};
this._onDomEventDelegate=null;
this._browserHandlers={};
};
Telerik.Web.UI.Scheduler.EventMap.prototype={initialize:function(_8c,_8d){
this._owner=_8c;
if(!_8d){
_8d=this._owner.get_element();
}
this._element=_8d;
},skipElement:function(e,_8f){
var _90=e.target;
var _91=_90.tagName.toLowerCase();
var _92=_90.className;
if(_91=="select"){
return true;
}
if(_91=="option"){
return true;
}
if(_91=="a"&&(!_8f||_92.indexOf(_8f)<0)){
return true;
}
if(_91=="input"){
return true;
}
if(_91=="textarea"){
return true;
}
if(_91=="button"){
return true;
}
return false;
},dispose:function(){
if(this._onDomEventDelegate){
for(var _93 in this._eventMap){
if(this._shouldUseEventCapture(_93)){
var _94=this._browserHandlers[_93];
this._element.removeEventListener(_93,_94,true);
}else{
$removeHandler(this._element,_93,this._onDomEventDelegate);
}
}
this._onDomEventDelegate=null;
var _95=true;
if(this._element._events){
for(var e in this._element._events){
if(this._element._events[e].length>0){
_95=false;
break;
}
}
if(_95){
this._element._events=null;
}
}
}
},addHandlerForClassName:function(_97,_98,_99){
if(typeof (this._eventMap[_97])=="undefined"){
this._eventMap[_97]={};
if(this._shouldUseEventCapture(_97)){
var _9a=this._getDomEventDelegate();
var _9b=this._element;
var _9c=function(e){
return _9a.call(_9b,new Sys.UI.DomEvent(e));
};
this._browserHandlers[_97]=_9c;
_9b.addEventListener(_97,_9c,true);
}else{
$addHandler(this._element,_97,this._getDomEventDelegate());
}
}
var _9e=this._eventMap[_97];
_9e[_98]=_99;
},_onDomEvent:function(e){
var _a0=this._eventMap[e.type];
if(!_a0){
return;
}
var _a1=e.target;
while(_a1&&_a1.nodeType!==9){
var _a2=_a1.className;
var _a3=_a2.split(" ");
var _a4=null;
for(var i=0;i<_a3.length;i++){
_a4=_a0[_a3[i]];
if(_a4){
break;
}
}
if(_a4){
this._fillEventFields(e,_a1);
if(_a4.call(this._owner,e)!=true){
if(!_a1.parentNode){
e.stopPropagation();
}
return;
}
}
if(_a1==this._element){
return;
}
_a1=_a1.parentNode;
}
},_fillEventFields:function(e,_a7){
e.eventMapTarget=_a7;
if(e.rawEvent.relatedTarget){
e.eventMapRelatedTarget=e.rawEvent.relatedTarget;
}else{
if(e.type=="mouseover"){
e.eventMapRelatedTarget=e.rawEvent.fromElement;
}else{
e.eventMapRelatedTarget=e.rawEvent.toElement;
}
}
if(!e.eventMapRelatedTarget){
return;
}
try{
var _a8=e.eventMapRelatedTarget.className;
}
catch(ex){
e.eventMapRelatedTarget=this._element;
}
},_shouldUseEventCapture:function(_a9){
return (_a9=="blur"||_a9=="focus")&&$telerik.isFirefox&&Sys.Browser.version>=3;
},_getDomEventDelegate:function(){
if(!this._onDomEventDelegate){
this._onDomEventDelegate=Function.createDelegate(this,this._onDomEvent);
}
return this._onDomEventDelegate;
}};
Telerik.Web.UI.Scheduler.EventMap.registerClass("Telerik.Web.UI.Scheduler.EventMap");
Type.registerNamespace("Telerik.Web.UI");
(function($){
Telerik.Web.UI.InlineTemplate=function(_ab,_ac,_ad,_ae,_af){
this._schedulerElement=_ab;
this._schedulerContentElement=$telerik.getElementByClassName(this._schedulerElement,"rsContent","div");
this._localization=_ac;
this._minWidth=_ae;
this._minHeight=_af;
this._wrapZIndexStep=1000;
var _b0=_ac.Save;
var _b1=_ac.Cancel;
var _b2=_ac.ShowAdvancedForm;
this._formHTMLTemplate="<div class=\"rsAptEditFormWrapper\"> \t<div class=\"rsAptEditFormOuter\"> \t\t<div class=\"rsAptEditFormMiddle\"> \t\t\t<div class=\"rsAptEditFormMiddle2\"> \t\t\t\t<div class=\"rsAptEditFormInner\"> \t\t\t\t\t<div style=\"{0}\" class=\"rsAptEditTextareaWrapper\"> \t\t\t\t\t\t<textarea id=\"{1}\" style=\"{2}\"></textarea> \t\t\t\t\t</div> \t\t\t\t\t<div class=\"rsEditOptions\"> \t\t\t\t\t\t<a href=\"#\" class=\"rsAptEditConfirm\">"+_b0+"</a> \t\t\t\t\t\t<a href=\"#\" class=\"rsAptEditCancel\">"+_b1+"</a>";
if(_ad){
this._formHTMLTemplate+="<a href=\"#\" class=\"rsAptEditMore\">"+_b2+"</a>";
}
this._formHTMLTemplate+="</div> \t\t\t\t\t<div class=\"rsAptEditResizeHandle\"></div> \t\t\t\t</div> \t\t\t</div> \t\t</div> \t</div> </div>";
this._textareaId=this._schedulerElement.id+"_SubjectTextBox";
this._onResizeHandleMouseMoveDelegate=Function.createDelegate(this,this._onResizeHandleMouseMove);
this._onResizeHandleMouseUpDelegate=Function.createDelegate(this,this._onResizeHandleMouseUp);
this._onKeyboardEventDelegate=Function.createDelegate(this,this._onKeyboardEvent);
};
Telerik.Web.UI.InlineTemplate.EmptyFunction=function(){
};
Telerik.Web.UI.InlineTemplate._positionForm=function(_b3){
var _b4=$("#"+_b3);
var _b5=_b4.find("div.rsAptEditSizingWrapper");
if(_b5.length==0){
return;
}
if(_b5[0].detached){
return;
}
var _b6=_b4.find("div.rsContent");
var _b7=_b5.parents("table.rsContentTable, table.rsAllDayTable, table.rsTimelineTable");
var _b8=_b5.offset();
var _b9=_b7.offset();
var _ba=_b5.parents("table.rsAllDayTable").length!=0&&!_b6.is(".rsTimelineView");
var _bb=_b4.find("div.rsContentScrollArea");
var _bc=_bb.scrollLeft();
var _bd=false;
if(!_ba){
var _be=_b8.top+_b5.height();
var _bf=_b9.top+_b7.height();
if(_be>_bf){
_b5.css("top",(_bf-_be)+"px");
_bd=true;
}
}
var _c0=false;
var _c1=_b8.left+_b5.width();
var _c2=_b9.left+_b7.width();
if(_c3){
_c2+=_bc-Telerik.Web.UI.RadScheduler._getScrollBarWidth();
}
if(_c1>_c2){
_b5.css("left",(_c2-_c1)+"px");
_c0=true;
var _c3=_bb[0].scrollHeight!=_bb[0].offsetHeight;
if(_c3){
_b5.css("left",(parseInt(_b5.css("left"))-Telerik.Web.UI.RadScheduler._getScrollBarWidth())+"px");
}
}
if(_ba){
var _c4=_b6.offset();
_b8=_b5.offset();
var _c5=_b6.prev();
if(_c5.is(".rsHeader")){
_c4.top-=_c5.height();
}
var _c6=(_b8.top-_c4.top);
var _c7=_b5.offset().left-_b6.offset().left;
_b5.css({top:_c6+"px",left:_c7+"px",width:_b5.width()+"px"});
_b5[0].originalLeft=_c7+_bc;
_b5[0].originalParent=_b5[0].parentNode;
_b5.appendTo(_b6);
_b5[0].detached=true;
}
var _c8=_b5.find("div.rsAptEditTextareaWrapper");
if(_c8){
var _c9=_c8.find("textarea:first");
if(_c9.length>0){
if($telerik.isIE&&_c8.css("height")!="auto"){
_c9.css("height",_c8.css("height"));
_c8.css("height","auto");
}
if($telerik.isIE6){
_c9.width(_c9.width());
}
if($telerik.isFirefox){
_c9[0].scrollIntoView=Telerik.Web.UI.InlineTemplate.EmptyFunction;
}
}
}
if(_bd){
_b6[0].scrollTop=_b6[0].scrollHeight;
}
if(_c0){
_b6[0].scrollLeft=_b6[0].scrollWidth;
}
_b5.css("visibility","visible");
};
Telerik.Web.UI.InlineTemplate.prototype={instantiateIn:function(_ca){
this._cleanup();
var _cb=document.createElement("div");
_cb.className="rsAptEditSizingWrapper";
_cb.style.zIndex=20000;
_cb.style.visibility="visible";
var _cc=this._getTargetElement(_ca);
if(_cc.offsetWidth<this._minWidth){
_cb.style.width=this._minWidth+"px";
}
var _cd="";
var _ce="";
if(_cc.offsetHeight<this._minHeight){
var _cf="height: "+this._minHeight+"px";
if($telerik.isIE){
_ce=_cf;
}else{
_cd=_cf;
}
}
var _d0=String.format(this._formHTMLTemplate,_cd,this._textareaId,_ce);
_cb.innerHTML=_d0;
_cc.appendChild(_cb);
this._element=_cb;
this._textArea=document.getElementById(this._textareaId);
Telerik.Web.UI.InlineTemplate._positionForm(this._schedulerElement.id);
this._textArea.focus();
this._attachHandlers(true);
},attachTo:function(_d1){
this._element=_d1;
this._textArea=$(_d1).find("textarea:first")[0];
this._attachHandlers(false);
},get_events:function(){
if(!this._events){
this._events=new Sys.EventHandlerList();
}
return this._events;
},get_text:function(){
if(this._textArea){
return this._textArea.value;
}
},set_text:function(_d2){
if(this._textArea){
this._textArea.value=_d2;
}
},get_start:function(){
return this._start;
},set_start:function(_d3){
this._start=_d3;
},get_end:function(){
return this._end;
},set_end:function(_d4){
this._end=_d4;
},get_editSeries:function(){
return this._editSeries;
},set_editSeries:function(_d5){
this._editSeries=_d5;
},get_isInsert:function(){
return this._isInsert;
},set_isInsert:function(_d6){
this._isInsert=_d6;
},get_appointmentInternalID:function(){
return this._appointmentInternalID;
},set_appointmentInternalID:function(_d7){
this._appointmentInternalID=_d7;
},get_element:function(){
return this._element;
},dispose:function(){
this._events=null;
this._cleanup();
},add_saveClicked:function(_d8){
this.get_events().addHandler("saveClicked",_d8);
},add_moreClicked:function(_d9){
this.get_events().addHandler("moreClicked",_d9);
},_getTargetElement:function(_da){
var _db=$(_da);
var _dc=_db;
if(!_dc.is("td")){
_dc=_dc.parents("td:first");
}
var _dd=null;
if(_db!=_dc){
if(_db.is(".rsWrap")){
_dd=_dc.find("div.rsWrap:first");
}else{
_dd=_db.parent();
}
}else{
_dd=$("<div class=\"rsWrap\"></div>").appendTo(_db).css({position:"absolute",top:_dc[0].offsetTop,left:_dc[0].offsetLeft,width:_dc.width(),height:"auto"});
}
_dd.css({zIndex:parseInt(_dd.css("zIndex"))+this._wrapZIndexStep});
return _dd[0];
},_cleanup:function(){
if(!this._element){
return;
}
if(this._eventMap){
this._eventMap.dispose();
}
$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
var _de=this._element.originalParent||this._element.parentNode;
if(_de.childNodes.length==0){
_de.parentNode.removeChild(_de);
}else{
_de.style.zIndex=parseInt(_de.style.zIndex)-this._wrapZIndexStep;
}
$(this._element).remove();
this._element=null;
},_attachHandlers:function(_df){
if(!this._element){
return;
}
this._eventMap=new Telerik.Web.UI.Scheduler.EventMap();
this._eventMap.initialize(this);
this._eventMap.addHandlerForClassName("mousedown","rsAptEditResizeHandle",this._onResizeHandleMouseDown);
if(_df){
this._eventMap.addHandlerForClassName("click","rsAptEditConfirm",this._saveClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditCancel",this._cancelClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditMore",this._moreClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditSizingWrapper",this._clicked);
this._eventMap.addHandlerForClassName("dblclick","rsAptEditSizingWrapper",this._clicked);
}
$addHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
},_saveClicked:function(e){
this._raiseEvent("saveClicked",null);
$telerik.cancelRawEvent(e);
return false;
},_cancelClicked:function(e){
this._cleanup();
$telerik.cancelRawEvent(e);
return false;
},_moreClicked:function(e){
this._raiseEvent("moreClicked",null);
$telerik.cancelRawEvent(e);
return false;
},_clicked:function(e){
$telerik.cancelRawEvent(e);
return false;
},_onResizeHandleMouseDown:function(e){
this._resizeOrigin={x:e.clientX,y:e.clientY,scrollTop:this._schedulerContentElement.scrollTop};
this._resizing=true;
this._initialSize={width:this._element.offsetWidth,height:this._textArea.parentNode.offsetHeight};
$addHandler(this._schedulerContentElement,"mousemove",this._onResizeHandleMouseMoveDelegate);
$addHandler(document,"mouseup",this._onResizeHandleMouseUpDelegate);
$addHandler(document,"selectstart",this._onSelectStart);
},_onResizeHandleMouseMove:function(e){
if(!$telerik.isMouseOverElement(this._schedulerElement,e)){
return;
}
var _e6=e.clientX-this._resizeOrigin.x;
var _e7=e.clientY-this._resizeOrigin.y;
_e6+=this._initialSize.width+this._schedulerContentElement.scrollLeft;
_e7+=this._initialSize.height+(this._schedulerContentElement.scrollTop-this._resizeOrigin.scrollTop);
_e6=Math.max(_e6,this._minWidth);
_e7=Math.max(_e7,this._minHeight);
this._setSize(_e6,_e7);
Telerik.Web.UI.RadScheduler._clearSelection();
},_onResizeHandleMouseUp:function(e){
this._cleanupResize();
},_onSelectStart:function(e){
return false;
},_cleanupResize:function(){
if(!this._resizing){
return;
}
$removeHandler(this._schedulerContentElement,"mousemove",this._onResizeHandleMouseMoveDelegate);
$removeHandler(document,"mouseup",this._onResizeHandleMouseUpDelegate);
$removeHandler(document,"selectstart",this._onSelectStart);
Telerik.Web.UI.RadScheduler._clearSelection();
this._resizing=false;
},_onKeyboardEvent:function(e){
if(e.keyCode==27){
this._cleanupResize();
}
},_setSize:function(_eb,_ec){
if(!this._element||!this._textArea){
return;
}
this._element.style.width=_eb+"px";
if($telerik.isIE6){
this._textArea.style.width="100%";
this._textArea.style.cssText=this._textArea.style.cssText;
this._textArea.style.width=this._textArea.offsetWidth+"px";
}
if($telerik.isIE){
this._textArea.style.height=(_ec-6)+"px";
}else{
this._textArea.parentNode.style.height=_ec+"px";
}
},hide:function(e){
this._cleanup();
},_raiseEvent:function(_ee,_ef){
var _f0=this.get_events().getHandler(_ee);
if(_f0){
if(!_ef){
_ef=Sys.EventArgs.Empty;
}
_f0(this,_ef);
}
}};
})($telerik.$);
Telerik.Web.UI.InlineTemplate.registerClass("Telerik.Web.UI.InlineTemplate",null,Sys.IDisposable);
(function($){
var _f2="<div class=\"rsModalWrapper\">\t<div class=\"rsOverlay\"></div>\t<div class=\"rsModalDialog\">\t\t<div class=\"rsModalOuter\">    \t\t<div class=\"rsModalOuterTitle\">    \t\t    <span class=\"rsModalOuterTitleText\"></span>\t\t        <div class=\"rsModalInner\">\t\t\t        <h1 class=\"rsModalTitle\"></h1>\t\t\t        <div class=\"rsModalContent\"></div>\t\t\t        <div class=\"rsModalButtons\">\t\t\t\t        <a href=\"#\" class=\"rsModalConfirm\">OK</a>\t\t\t\t        <a href=\"#\" class=\"rsModalClose\">Cancel</a>\t\t\t        </div>\t\t\t        <div class=\"rsModalIcon\"></div>\t\t        </div>    \t\t</div>\t\t</div>\t</div></div>";
$.bind=function(_f3,_f4){
return function(e){
if(e){
e.preventDefault();
}
return _f3[_f4].apply(_f3,arguments);
};
};
$.modal=function(_f6){
if(!(this instanceof $.modal)){
return new $.modal(_f6);
}
this._actionCallback=null;
this._actionCancelCallback=null;
var _f7=$(_f6);
var _f8=_f7.find(".rsModalWrapper");
var _f9=380;
if(_f8.length==0){
this._dialog=$(_f2).appendTo(_f7).hide().css({height:_f7.height(),width:_f7.width(),left:"1px",top:"1px",background:"none"}).find(".rsOverlay").css({height:_f7.height(),width:_f7.width(),opacity:0}).end().find(".rsModalDialog").css({width:_f9,left:(_f7.width()-_f9)/2,opacity:0}).end();
}else{
this._dialog=_f8;
}
return this;
};
$.modal.prototype={initialize:function(){
this._dialog.find(".rsModalClose").bind("click",$.bind(this,"hide")).end().find(".rsModalConfirm").bind("click",$.bind(this,"hide"));
return this;
},set_content:function(obj){
for(var key in obj){
switch(key){
case "title":
this._dialog.find(".rsModalTitle").text(obj.title);
break;
case "content":
this._dialog.find(".rsModalContent").html(obj.content);
break;
case "ok":
this._dialog.find(".rsModalConfirm").text(obj.ok);
break;
case "cancel":
this._dialog.find(".rsModalClose").text(obj.cancel);
break;
}
}
return this;
},set_onActionConfirm:function(_fc){
if($.isFunction(_fc)){
var _fd=this._dialog.find(".rsModalConfirm");
if($.isFunction(this._actionCallback)){
_fd.unbind("click",this._actionCallback);
}
_fd.bind("click",_fc);
this._actionCallback=_fc;
}
return this;
},set_onActionCancel:function(_fe){
if($.isFunction(_fe)){
var _ff=this._dialog.find(".rsModalClose");
if($.isFunction(this._actionCancelCallback)){
_ff.unbind("click",this._actionCancelCallback);
}
_ff.bind("click",_fe);
this._actionCancelCallback=_fe;
}
return this;
},show:function(){
this._dialog.show().find(".rsOverlay").stop().animate({opacity:0.4},"slow").end().find(".rsModalDialog").stop().animate({opacity:1},"slow").end();
var _100=this._dialog.find(".rsModalDialog");
_100.css({top:(this._dialog.parent().height()-_100.height())/2});
return this;
},hide:function(){
this._dialog.find(".rsOverlay").stop().animate({opacity:0},"fast").end().find(".rsModalDialog").stop().animate({opacity:0},"fast",$.bind(this._dialog,"hide")).end();
return this;
},dispose:function(){
this._dialog.find(".rsModalConfirm").unbind().end().find(".rsModalClose").unbind();
}};
})($telerik.$);
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");
(function($){
Telerik.Web.UI.RadScheduler=function(_102){
Telerik.Web.UI.RadScheduler.initializeBase(this,[_102]);
this._styles={dragTarget:"rsDragTarget",inlineForm:{sizingWrapper:"rsAptEditSizingWrapper"}};
this._postBackReference=null;
this._minutesPerRow=30;
this._numberOfHoveredRows=2;
this._selectedView=0;
this._readOnly=false;
this._overflowBehavior=1;
this._shouldPostbackOnClick=true;
this._displayDeleteConfirmation=true;
this._displayRecurrenceActionDialogOnMove=false;
this._firstDayStart=null;
this._appointments=null;
this._currentAppointment=null;
this._resources=null;
this._scrollTop=0;
this._scrollLeft=0;
this._useHorizontalScrolling=false;
this._localization=null;
this._shouldFireFormCreated=false;
this._advancedTemplate=null;
this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection();
this._blockCollection=new Telerik.Web.UI.SchedulerRendering.BlockCollection();
this._datePickerCalendarExpanded=false;
this._allowEdit=true;
this._allowDelete=true;
this._allowInsert=true;
this._enableAdvancedTemplateScript=false;
this._dragging=false;
this._draggingAppointment=null;
this._onKeyboardEventDelegate=null;
this._modelClassName=null;
this._modelData={};
this._activeModel=null;
this._modelTables=null;
this._resizingState={};
this._eventMap=new Telerik.Web.UI.Scheduler.EventMap();
this._minimumInlineFormHeight=50;
this._minimumInlineFormWidth=200;
this._shouldUseClientInlineInsertForm=true;
this._shouldUseClientInlineEditForm=true;
this._defaultInlineFormRendered=false;
this._enableAdvancedForm=true;
this._validationGroup=null;
};
Telerik.Web.UI.RadScheduler._incrementTime=function(date,_104,_105){
if(isNaN(_105)){
_105=0;
}
var _106=date.getTimezoneOffset();
date.setTime(date.getTime()+(_104*3600000)+(_105*60000));
var _107=date.getTimezoneOffset();
date.setTime(date.getTime()+((_107-_106)*60000));
};
Telerik.Web.UI.RadScheduler._getScrollBarWidth=function(){
if(Telerik.Web.UI.RadScheduler._scrollbarWidth){
return Telerik.Web.UI.RadScheduler._scrollbarWidth;
}
var _108,_109=0;
var _10a=document.createElement("div");
_10a.style.position="absolute";
_10a.style.top="-1000px";
_10a.style.left="-1000px";
_10a.style.width="100px";
_10a.style.height="50px";
_10a.style.overflow="hidden";
var _10b=document.createElement("div");
_10b.style.width="100%";
_10b.style.height="200px";
_10a.appendChild(_10b);
document.body.appendChild(_10a);
var _10c=_10b.offsetWidth;
_10a.style.overflow="auto";
var _10d=_10b.offsetWidth;
Telerik.Web.UI.RadScheduler._scrollbarWidth=_10c-_10d;
if(Telerik.Web.UI.RadScheduler._scrollbarWidth<=0){
_10b.style.width="300px";
_108=_10a.offsetWidth;
_109=_10a.clientWidth;
Telerik.Web.UI.RadScheduler._scrollbarWidth=_108-_109;
}
if(Telerik.Web.UI.RadScheduler._scrollbarWidth<=0){
Telerik.Web.UI.RadScheduler._scrollbarWidth=16;
}
document.body.removeChild(document.body.lastChild);
return Telerik.Web.UI.RadScheduler._scrollbarWidth;
};
Telerik.Web.UI.RadScheduler._preInitialize=function(_10e,_10f,_110,_111,_112){
var _113=$("#"+_10e);
if(_113[0]._preInitialized==true&&!$telerik.isIE){
return;
}
Telerik.Web.UI.RadScheduler._adjustContentDimensions(_113,_10f,_110,_111,_112);
_113[0]._preInitialized=true;
};
Telerik.Web.UI.RadScheduler._adjustContentDimensions=function(_114,_115,_116,_117,_118){
var _119={scheduler:_114,schedulerTopWrap:_114.find("div.rsTopWrap"),contentWrapper:_114.find("td.rsContentWrapper"),verticalHeaderWrapper:_114.find("td.rsVerticalHeaderWrapper")};
var _11a=Telerik.Web.UI.RadScheduler._getScrollBarWidth();
if(_117==1){
Telerik.Web.UI.RadScheduler._adjustContentHeight(_119);
_114.find("td.rsHorizontalHeaderWrapper").children().children().css("margin-right",_11a+"px");
}
if(_118){
_114.find("table.rsVerticalHeaderTable").css("margin-bottom",_11a+"px");
}
Telerik.Web.UI.RadScheduler._adjustContentWidth(_119);
var _11b=_114.find("div.rsContentScrollArea");
if(_11b.length){
_11b.scrollTop(_115).scrollLeft(_116);
var _11c=_114.find(".rsVerticalHeaderTable").parent();
var _11d=_114.find("td.rsHorizontalHeaderWrapper div div");
if(!$telerik.isFirefox){
_11c.scrollTop(_115);
}
if($telerik.isIE6){
_11d.css("margin-left",_116+"px");
}else{
_11d.scrollLeft(_116);
}
}
Telerik.Web.UI.InlineTemplate._positionForm(_114[0].id);
};
Telerik.Web.UI.RadScheduler._adjustContentHeight=function(_11e){
var _11f=_11e.schedulerTopWrap.children().filter("div.rsHeader, div.rsFooter").add(_11e.schedulerTopWrap.find("td.rsHorizontalHeaderWrapper").get());
var _120=_11e.scheduler.css("overflow","hidden").height();
$.each(_11f,function(){
_120-=$(this).height();
});
var _121=0;
_11e.contentWrapper.find("table.rsContentTable, table.rsAllDayTable").each(function(){
if($(this).parents().is(".rsHorizontal")){
_121=$(this).height();
}else{
_121+=$(this).height();
}
});
if(_120>_121){
return;
}
_11e.contentWrapper.add(_11e.contentWrapper.children()[0]).add(_11e.verticalHeaderWrapper).add(_11e.verticalHeaderWrapper.children()[0]).height(_120-4);
_11e.scheduler.css("overflow","visible");
};
Telerik.Web.UI.RadScheduler._adjustContentWidth=function(_122){
var _123=_122.contentWrapper.add(_122.schedulerTopWrap.find("td.rsHorizontalHeaderWrapper").children().get()).add(_122.contentWrapper.children()[0]);
if($telerik.isIE){
_122.scheduler.css("overflow-x","hidden");
_122.schedulerTopWrap.width(_122.scheduler.width()-2);
_122.scheduler.css("overflow-x","");
}else{
_122.schedulerTopWrap.width(_122.scheduler.width()-2);
}
_123.width("100%");
var _124=_122.scheduler.width()-_122.verticalHeaderWrapper.width();
_123.width(_124-2);
};
Telerik.Web.UI.RadScheduler._clearSelection=function(){
if(document.selection&&document.selection.empty){
document.selection.empty();
}else{
if(window.getSelection&&window.getSelection().removeAllRanges){
window.getSelection().removeAllRanges();
}
}
};
Telerik.Web.UI.RadScheduler.prototype={initialize:function(){
var _125=this.get_element();
var _126=$(_125);
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.updateClientState();
Telerik.Web.UI.RadScheduler._preInitialize(this.get_element().id,this.get_scrollTop(),this.get_scrollLeft(),this.get_overflowBehavior(),this._useHorizontalScrolling);
this._repaintAdvancedTemplate();
this._initializeModelTables();
this._horizontalScrollAreas=_126.find("td.rsHorizontalHeaderWrapper").children().children();
this._verticalScrollAreas=_126.find(".rsVerticalHeaderTable");
if(_126.find(".rsTopWrap").length==0){
if(typeof (Telerik.Web.UI.Scheduling)!="undefined"&&typeof (Telerik.Web.UI.Scheduling.AdvancedTemplate)!="undefined"&&this._enableAdvancedTemplateScript){
var _127=this.get_element().id;
this._advancedTemplate=new Telerik.Web.UI.Scheduling.AdvancedTemplate(_127,_127+"_Form");
this._initializeAdvancedTemplateCallback=Function.createDelegate(this,this._initializeAdvancedTemplate);
Sys.Application.add_load(this._initializeAdvancedTemplateCallback);
}
}else{
this._eventMap.addHandlerForClassName("mousemove","rsContent",this._onContentScroll);
this._eventMap.addHandlerForClassName("dblclick","rsAptEdit",this._stopEventPropagation);
this._eventMap.addHandlerForClassName("dblclick","rsApt",this._onAppointmentDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsContentTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsAllDayTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsTimelineTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("click","rsAptResize",this._onResizeGripMouseClick);
this._eventMap.addHandlerForClassName("click","rsApt",this._onAppointmentClick);
this._eventMap.addHandlerForClassName("click","rsAptDelete",this._onAppointmentDeleteClick);
this._eventMap.addHandlerForClassName("click","rsArrowTop",this._onPreviousDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowBottom",this._onNextDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowLeft",this._onPreviousDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowRight",this._onNextDayClick);
this._eventMap.addHandlerForClassName("click","rsNextDay",this._onNextSchedulerDayClick);
this._eventMap.addHandlerForClassName("click","rsPrevDay",this._onPreviousSchedulerDayClick);
this._eventMap.addHandlerForClassName("click","rsToday",this._onTodayClick);
this._eventMap.addHandlerForClassName("click","rsFullTime",this._onFullTimeLinkClick);
this._eventMap.addHandlerForClassName("click","rsAptEdit",this._onEditFormClick);
this._eventMap.addHandlerForClassName("click","rsShowMore",this._onShowMoreClick);
this._eventMap.addHandlerForClassName("click","rsHeaderDay",this._onDayViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderWeek",this._onWeekViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderMonth",this._onMonthViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderTimeline",this._onTimelineViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderMultiDay",this._onMultiDayViewTabClick);
this._eventMap.addHandlerForClassName("click","rsContentTable",this._onCellClick);
this._eventMap.addHandlerForClassName("click","rsAllDayTable",this._onCellClick);
this._eventMap.addHandlerForClassName("click","rsDatePickerActivator",this._onDatePickerToggle);
this._eventMap.addHandlerForClassName("mouseover","rsAllDayTable",this._onRowMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsContentTable",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","rsContent",this._onRowMouseOut);
this._eventMap.addHandlerForClassName("mouseout","rsAllDayCell",this._onRowMouseOut);
this._eventMap.addHandlerForClassName("mouseout","rsApt",this._onAppointmentMouseOut);
this._eventMap.addHandlerForClassName("mousedown","rsAptDelete",this._stopEventPropagation);
this._eventMap.addHandlerForClassName("mousedown","rsApt",this._onAppointmentMouseDown);
this._eventMap.addHandlerForClassName("mousedown","rsAptResize",this._onResizeGripMouseDown);
this._eventMap.addHandlerForClassName("mouseup","rsContent",this._endDrag);
this._eventMap.addHandlerForClassName("contextmenu","rsApt",this._onAppointmentContextMenu);
this._eventMap.addHandlerForClassName("contextmenu","rsContent",this._onCellContextMenu);
this._eventMap.addHandlerForClassName("contextmenu","rsAllDayCell",this._onCellContextMenu);
this._contentScrollArea=_126.find("div.rsContentScrollArea")[0];
if(this._contentScrollArea){
this._onContentScrollDelegate=Function.createDelegate(this,this._onContentScroll);
$addHandler(this._contentScrollArea,"scroll",this._onContentScrollDelegate);
}
this._onKeyboardEventDelegate=Function.createDelegate(this,this._onKeyboardEvent);
$addHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
this._onContentScroll();
this._initializeDatePickerCallback=Function.createDelegate(this,this._initializeDatePicker);
Sys.Application.add_load(this._initializeDatePickerCallback);
}
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);
if(this._shouldFireFormCreated){
this._fireFormCreated();
}
if(this._defaultInlineFormRendered){
this._getInlineTemplate();
}
},_initializeDatePicker:function(){
Sys.Application.remove_load(this._initializeDatePickerCallback);
if(!this.get_element()){
return;
}
var _128=$find(this.get_element().id+"_SelectedDateCalendar");
if(!_128){
return;
}
_128.add_calendarViewChanging(function(_129,_12a){
_129.set_autoPostBack(false);
});
_128.add_calendarViewChanged(function(_12b,_12c){
_12b.set_autoPostBack(true);
});
},_initializeAdvancedTemplate:function(){
if(this._advancedTemplate){
this._advancedTemplate.initialize();
}
Sys.Application.remove_load(this._initializeAdvancedTemplateCallback);
},dispose:function(){
var _12d=this.get_element();
if(this._onKeyboardEventDelegate){
$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
}
var _12e=this.get_contentElement();
if(_12e){
$clearHandlers(_12e);
}
if(this._contentScrollArea){
$clearHandlers(this._contentScrollArea);
}
this._eventMap.dispose();
this._modelTables=null;
this._resizingState=null;
if(this._inlineTemplate){
this._inlineTemplate.dispose();
}
Telerik.Web.UI.RadScheduler.callBaseMethod(this,"dispose");
},repaint:function(){
Telerik.Web.UI.RadScheduler._adjustContentDimensions($(this.get_element()),this.get_scrollTop(),this.get_scrollLeft(),this.get_overflowBehavior(),this._useHorizontalScrolling);
this._repaintAdvancedTemplate();
this._initializeModelTables();
},_repaintAdvancedTemplate:function(){
if(this.get_overflowBehavior()==1){
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(_12f){
this._appointments=new Telerik.Web.UI.SchedulerAppointmentCollection(this);
var _130=eval("("+_12f+")");
for(var i=0;i<_130.length;i++){
var _132=new Telerik.Web.UI.SchedulerAppointment(_130[i],this);
this._appointments.add(_132);
}
},get_resources:function(){
return this._resources;
},set_resources:function(_133){
this._resources=new Telerik.Web.UI.SchedulerResourceCollection();
var _134=Sys.Serialization.JavaScriptSerializer.deserialize(_133);
for(var i=0;i<_134.length;i++){
var _136=new Telerik.Web.UI.SchedulerResource(_134[i]);
this._resources.add(_136);
}
},get_firstDayStart:function(){
return this._firstDayStart;
},set_firstDayStart:function(_137){
this._firstDayStart=new Date(Date.parse(_137));
},get_currentAppointment:function(){
return this._currentAppointment;
},set_currentAppointment:function(_138){
var _139=Sys.Serialization.JavaScriptSerializer.deserialize(_138);
this._currentAppointment=new Telerik.Web.UI.SchedulerAppointment(_139,this,null);
},get_localization:function(){
return this._localization;
},set_localization:function(_13a){
this._localization=Sys.Serialization.JavaScriptSerializer.deserialize(_13a);
},get_scrollTop:function(){
return this._scrollTop;
},set_scrollTop:function(_13b){
this._scrollTop=_13b;
},get_scrollLeft:function(){
return this._scrollLeft;
},set_scrollLeft:function(_13c){
this._scrollLeft=_13c;
},get_displayDeleteConfirmation:function(){
return this._displayDeleteConfirmation;
},set_displayDeleteConfirmation:function(_13d){
this._displayDeleteConfirmation=_13d;
},get_displayRecurrenceActionDialogOnMove:function(){
return this._displayRecurrenceActionDialogOnMove;
},set_displayRecurrenceActionDialogOnMove:function(_13e){
this._displayRecurrenceActionDialogOnMove=_13e;
},get_shouldPostbackOnClick:function(){
return this._shouldPostbackOnClick;
},set_shouldPostbackOnClick:function(_13f){
this._shouldPostbackOnClick=_13f;
},get_shouldUseClientInlineInsertForm:function(){
return this._shouldUseClientInlineInsertForm;
},set_shouldUseClientInlineInsertForm:function(_140){
this._shouldUseClientInlineInsertForm=_140;
},get_shouldUseClientInlineEditForm:function(){
return this._shouldUseClientInlineEditForm;
},set_shouldUseClientInlineEditForm:function(_141){
this._shouldUseClientInlineEditForm=_141;
},get_defaultInlineFormRendered:function(){
return this._defaultInlineFormRendered;
},set_defaultInlineFormRendered:function(_142){
this._defaultInlineFormRendered=_142;
},get_overflowBehavior:function(){
return this._overflowBehavior;
},set_overflowBehavior:function(_143){
this._overflowBehavior=_143;
},get_readOnly:function(){
return this._readOnly;
},set_readOnly:function(_144){
this._readOnly=_144;
},get_selectedView:function(){
return this._selectedView;
},set_selectedView:function(_145){
this._selectedView=_145;
},get_minutesPerRow:function(){
return this._minutesPerRow;
},set_minutesPerRow:function(_146){
this._minutesPerRow=_146;
},get_postBackReference:function(){
return this._postBackReference;
},set_postBackReference:function(_147){
this._postBackReference=_147;
},get_allowEdit:function(){
return this._allowEdit;
},set_allowEdit:function(_148){
this._allowEdit=_148;
},get_allowDelete:function(){
return this._allowDelete;
},set_allowDelete:function(_149){
this._allowDelete=_149;
},get_allowInsert:function(){
return this._allowInsert;
},set_allowInsert:function(_14a){
this._allowInsert=_14a;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_14b){
this._attributes._load(_14b);
},get_activeModel:function(){
return this._activeModel;
},set_numberOfHoveredRows:function(_14c){
this._numberOfHoveredRows=_14c;
},get_numberOfHoveredRows:function(){
return this._numberOfHoveredRows;
},set_groupBy:function(_14d){
this._groupBy=_14d;
},get_groupBy:function(){
return this._groupBy;
},get_contentElement:function(){
return $telerik.getElementByClassName(this.get_element(),"rsContent","div");
},get_minimumInlineFormWidth:function(){
return this._minimumInlineFormWidth;
},set_minimumInlineFormWidth:function(_14e){
this._minimumInlineFormWidth=_14e;
},get_minimumInlineFormHeight:function(){
return this._minimumInlineFormHeight;
},set_minimumInlineFormHeight:function(_14f){
this._minimumInlineFormHeight=_14f;
},get_validationGroup:function(){
return this._validationGroup;
},set_validationGroup:function(_150){
this._validationGroup=_150;
},showInsertFormAt:function(_151){
if(this.get_shouldUseClientInlineInsertForm()){
if(this._datePickerCalendarExpanded){
this._onDatePickerToggle();
}
var _152=this._getInlineTemplate();
_152.instantiateIn(_151.get_domElement());
_152.set_text("");
_152.set_isInsert(true);
this._fireFormCreated();
return;
}
var _153=_151.get_domElement().offsetWidth;
var _154=_151.get_domElement().offsetHeight;
var _155={command:"Insert",appointmentID:-1,targetSlotIndex:_151.get_index(),slotWidth:_153,slotHeight:_154};
this.postback(_155);
},insertAppointment:function(_156){
var _157={command:"InsertAppointment",appointment:this._getSerializableAppointment(_156),startDate:_156.get_start().format("yyyyMMddHHmm"),endDate:_156.get_end().format("yyyyMMddHHmm")};
this.postback(_157);
},updateAppointment:function(_158,_159){
var _15a={command:"UpdateAppointment",appointmentID:_158._internalID,appointment:this._getSerializableAppointment(_158),startDate:_158.get_start().format("yyyyMMddHHmm"),endDate:_158.get_end().format("yyyyMMddHHmm"),editSeries:_159};
this.postback(_15a);
},editAppointment:function(_15b,_15c){
var slot=_15b.get_element().parentNode.parentNode;
if(this.get_shouldUseClientInlineEditForm()){
if(this._datePickerCalendarExpanded){
this._onDatePickerToggle();
}
var _15e=this._getInlineTemplate();
_15e.instantiateIn(_15b.get_element());
_15e.set_appointmentInternalID(_15b._internalID);
_15e.set_text(_15b.get_subject());
_15e.set_start(_15b.get_start());
_15e.set_end(_15b.get_end());
_15e.set_editSeries(_15c);
_15e.set_isInsert(false);
this._fireFormCreated();
return;
}
var _15f=slot.offsetWidth;
var _160=slot.offsetHeight;
var _161={command:"Edit",appointmentID:_15b._internalID,editSeries:_15c,slotWidth:_15f,slotHeight:_160};
this.postback(_161);
},deleteAppointment:function(_162,_163){
var _164={command:"Delete",appointmentID:_162._internalID,editSeries:_163};
this.postback(_164);
},getAppointmentDomElement:function(_165){
while(_165&&!Sys.UI.DomElement.containsCssClass(_165,"rsApt")){
_165=_165.parentNode;
}
return _165;
},getAppointmentFromDomElement:function(_166){
if(!_166){
return null;
}
var _167=this.getAppointmentDomElement(_166);
var _168=this.get_appointments();
for(var i=0;i<_168.get_count();i++){
var _16a=_168.getAppointment(i);
if(!_16a.get_element()){
continue;
}
for(var _16b=0;_16b<_16a._domElements.length;_16b++){
if(_167.id==_16a._domElements[_16b]){
return _16a;
}
}
}
return null;
},saveClientState:function(){
return "{\"scrollTop\":"+this._scrollTop+",\"scrollLeft\":"+this._scrollLeft+"}";
},_getSerializableAppointment:function(_16c){
var _16d=_16c.get_subject().replace(/'/g,"&squote");
_16d=encodeURIComponent(_16d);
return {ID:_16c._internalID,Subject:_16d,Resources:this._getSerializableResources(_16c.get_resources()),RecurrenceState:_16c.get_recurrenceState(),RecurrenceParentID:_16c.get_recurrenceParentID()};
},_getSerializableResources:function(_16e){
var _16f=[];
for(var i=0;i<_16e.get_count();i++){
var _171=_16e.getResource(i);
_16f[_16f.length]={Key:_171.get_key(),Text:_171.get_text(),Type:_171.get_type(),Available:_171.get_available()};
}
return _16f;
},_onAppointmentInserting:function(_172){
this._blockCollection.add(_172);
},_onAppointmentRemove:function(_173){
this._blockCollection.remove(_173);
},_onAppointmentsClear:function(){
this._blockCollection=new Telerik.Web.UI.SchedulerRendering.BlockCollection();
},_fireFormCreated:function(){
var _174=$("#"+this.get_element().id);
var _175=_174.find("div.rsAptEditFormInner");
if(_175.length==0){
_175=_174.find("div.rsAdvancedEdit");
}
if(_175.length>0){
var args=new Telerik.Web.UI.SchedulerFormCreatedEventArgs(this.get_currentAppointment(),_175[0]);
this.raise_formCreated(args);
}
},_onKeyboardEvent:function(e){
if(e.keyCode==27){
if(this._dragging){
this._abortDrag(e);
}
if(this._resizingState.resizing){
this._restoreResizingAppointmentSize();
this._cleanupResize();
}
}
},_onDatePickerToggle:function(e){
var _179=$(this.get_element()).find("div.rsDatePickerWrapper");
var _17a=_179.find("div:first");
var _17b=_17a.find("table:first");
var _17c=this.get_element().offsetWidth+"px";
_17a.stop().css({position:"absolute",overflow:"hidden",width:_17c}).css({width:_17b.width()+"px"});
_179.css("overflow","visible");
if(!this._datePickerCalendarExpanded){
var _17d=this._getInlineTemplate();
if(_17d.get_element()){
_17d.hide();
}
_17a.animate({height:_17b.height()+"px"},300,"easeInQuart");
}else{
_17a.animate({height:"0px"},300,"easeOutQuart",function(){
_179.css("overflow","hidden");
});
}
this._datePickerCalendarExpanded=!this._datePickerCalendarExpanded;
if(e){
e.preventDefault();
}
return false;
},_onContentScroll:function(e){
var _17f=this._contentScrollArea;
if(!_17f){
return;
}
if(this._horizontalScrollAreas.length){
if($telerik.isIE6){
this._horizontalScrollAreas.css("margin-left",-_17f.scrollLeft+"px");
}else{
this._horizontalScrollAreas.scrollLeft(_17f.scrollLeft);
}
}
if(this._verticalScrollAreas.length){
this._verticalScrollAreas.css("margin-top",-_17f.scrollTop+"px");
}
var _180=this._getInlineTemplate().get_element();
if(_180&&_180.detached){
_180.style.left=_180.originalLeft-_17f.scrollLeft+"px";
}
this._scrollLeft=_17f.scrollLeft;
this._scrollTop=_17f.scrollTop;
this.updateClientState();
},_onAppointmentClick:function(e){
var _182=this.getAppointmentFromDomElement(e.eventMapTarget);
var _183=new Telerik.Web.UI.SchedulerAppointmentClickEventArgs(_182);
this.raise_appointmentClick(_183);
if(this.get_readOnly()&&this.get_shouldPostbackOnClick()){
var _184={Command:"Click",AppointmentID:_182._internalID,EditSeries:false};
this.postback(_184);
}
},_onAppointmentContextMenu:function(e){
var _186=this.getAppointmentFromDomElement(e.eventMapTarget);
var _187=new Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs(_186,e);
this.raise_appointmentContextMenu(_187);
},_onEditFormClick:function(e){
e.stopPropagation();
},_getHourCellFromDomElement:function(_189){
var _18a=_189;
while(_18a.tagName.toLowerCase()!="th"){
_18a=_18a.parentNode;
}
return _18a;
},_onAllDayCellMouseOver:function(e){
if(this._dragging&&this._draggingAppointment){
e.eventMapTarget.lastChild.appendChild(this._draggingAppointment.get_element());
}
this._onRowMouseOver(e);
},_onRowMouseOver:function(e){
if(this._dragging||this._resizingState.resizing||this._getInlineTemplate()._resizing){
return;
}
this._removeRowHover();
var _18d=$(e.target);
while(!(_18d.is("td")&&_18d.parents("table:first").is(".rsContentTable, .rsAllDayTable"))){
_18d=_18d.parent();
if(_18d.length==0){
return;
}
}
var _18e=this.get_numberOfHoveredRows();
if(_18d.parents("table").is(".rsAllDayTable")||this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView){
_18e=1;
}
this._currentHoverCell=_18d[0];
var _18f=[this._currentHoverCell];
for(var i=1;i<_18e;i++){
var _191=this._getNextRowCell(_18f[i-1]);
if(_191){
_18f[i]=_191;
}else{
break;
}
}
$.each(_18f,function(){
$(this).addClass("rsAptCreate");
});
this._hoveredCells=_18f;
return true;
},_getParentTable:function(_192){
var _193=_192.parentNode;
while(_193.tagName.toLowerCase()!="table"){
_193=_193.parentNode;
}
return _193;
},_getNextRowCell:function(cell){
var _195=cell.parentNode;
var _196=this._getParentTable(cell);
var _197=_196.rows[_195.rowIndex+1];
var _198=null;
if(_197){
var _199=_197.cells.length;
var _19a=_195.cells.length;
if(_199==_19a){
_198=_197.cells[cell.cellIndex];
}else{
if(_199<_19a){
_198=_197.cells[cell.cellIndex-1];
}else{
_198=_197.cells[cell.cellIndex+1];
}
}
}
return _198;
},_onRowMouseOut:function(e){
if(!this._currentHoverCell){
return;
}
if(!e.eventMapRelatedTarget||$telerik.isDescendant(this._currentHoverCell,e.eventMapRelatedTarget)){
return;
}
this._removeRowHover();
},_removeRowHover:function(){
if(!this._hoveredCells){
return;
}
this._currentHoverCell=null;
$.each(this._hoveredCells,function(){
$(this).removeClass("rsAptCreate");
});
},_stopEventPropagation:function(e){
e.stopPropagation();
},_onResizeGripMouseDown:function(e){
if(this.get_readOnly()){
return;
}
this._resizingState.resizingElement=this.getAppointmentDomElement(e.eventMapTarget);
var _19e=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _19f=(_19e.get_allowEdit()!=null)?_19e.get_allowEdit():this.get_allowEdit();
if(!_19f){
return;
}
var _1a0=new Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs(_19e);
this.raise_appointmentResizeStart(_1a0);
if(_1a0.get_cancel()==false){
this._resizingState.resizing=true;
this._resizingState.resizingAppointment=_19e;
var _1a1=$(this._resizingState.resizingElement);
this._resizingState.originalSize={height:_1a1.height(),width:_1a1.width()};
$addHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$addHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$addHandler(document,"selectstart",this._onSelectStartDelegate);
}
},_restoreResizingAppointmentSize:function(){
if(!this._resizingState.originalSize){
return;
}
$(this._resizingState.resizingElement).height(this._resizingState.originalSize.height).width(this._resizingState.originalSize.width);
this._resizingState.resizingElement=null;
this._resizingState.originalSize=null;
},_onResizeGripMouseMove:function(e){
var _1a3=this._resizingState.resizingElement;
if(!_1a3){
return;
}
var _1a4=_1a3.parentNode.parentNode;
var _1a5=10;
var _1a6=this._getCellFromCoordinates(e.clientX,e.clientY-_1a5);
if(!_1a6){
return;
}
var _1a7=this._activeModel.getTimeSlotFromDomElement(_1a6);
var _1a8=new Telerik.Web.UI.SchedulerAppointmentResizingEventArgs(this._resizingState.resizingAppointment,_1a7);
this.raise_appointmentResizing(_1a8);
if(_1a8.get_cancel()){
return;
}
var _1a9=_1a4.parentNode.parentNode.parentNode;
var _1aa=_1a6.parentNode.parentNode.parentNode;
if(_1a9!=_1aa){
return;
}
this._activeModel.updateResizingAppointmentSize(_1a3,_1a6);
this._keepElementInView(this._resizingState.resizingElement,true);
},_onSelectStart:function(e){
return false;
},_findResizeTargetSlot:function(_1ac){
var _1ad=_1ac.parentNode.parentNode;
var _1ae=_1ad.parentNode;
var _1af;
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.TimelineView){
var _1b0=_1ad.offsetWidth;
var _1b1=Math.ceil(_1ac.offsetWidth/_1b0);
var _1b2=_1ad.cellIndex+_1b1-1;
_1b2=Math.min(_1b2,_1ae.cells.length-1);
var _1af=_1ae.cells[_1b2];
}else{
var _1b3=_1ac.parentNode.parentNode.offsetHeight;
var _1b4=Math.ceil(_1ac.offsetHeight/_1b3);
var _1b5=_1ae.rowIndex+_1b4-1;
_1b5=Math.min(_1b5,_1ae.parentNode.rows.length-1);
var _1b6=_1ae.parentNode.rows[_1b5];
_1af=_1b6.cells[_1ad.cellIndex];
}
return this._activeModel.getTimeSlotFromDomElement(_1af);
},_onResizeGripMouseUp:function(e){
if(!this._resizingState.resizingElement){
return;
}
var _1b8=this._findResizeTargetSlot(this._resizingState.resizingElement);
var _1b9=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _1ba=this._activeModel.getTimeSlotFromDomElement(_1b9.get_element());
var _1bb=_1b8.get_startTime();
Telerik.Web.UI.RadScheduler._incrementTime(_1bb,0,_1b8.get_duration());
if(_1bb.getTime()==_1b9.get_end().getTime()){
this._cleanupResize();
return;
}
var args={OnConfirm:this._onAppointmentResizeCallback,OnCancel:this._onAppointmentResizeAbortCallback,Scheduler:this,Appointment:_1b9,SourceSlotIndex:_1ba.get_index(),TargetSlotIndex:_1b8.get_index(),UpdatedEndDate:_1bb,CallbackIsCalledFromDialog:true};
if(_1b9._recurrenceState==1||_1b9._recurrenceState==2){
var _1bd=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Resize);
this.raise_recurrenceActionDialogShowing(_1bd);
if(_1bd.get_cancel()){
var _1be=_1bd.get_editSeries();
if(_1be!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(_1be,args);
}else{
this._onAppointmentResizeAbortCallback(args);
}
}else{
Telerik.Web.UI.RecurrenceActionDialog.Show(Telerik.Web.UI.RecurrenceAction.Resize,args);
}
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(false,args);
}
e.stopPropagation();
this._cleanupResize();
},_cleanupResize:function(){
this._resizingState.resizing=false;
this._resizingState.resizingAppointment=null;
$removeHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$removeHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$removeHandler(document,"selectstart",this._onSelectStartDelegate);
},_onAppointmentResizeCallback:function(_1bf,args){
if(args.CallbackIsCalledFromDialog){
var _1c1=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Resize,_1bf);
args.Scheduler.raise_recurrenceActionDialogClosed(_1c1);
}
var _1c2=new Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs(args.Appointment,args.UpdatedEndDate,_1bf);
args.Scheduler.raise_appointmentResizeEnd(_1c2);
if(_1c2.get_cancel()==false){
var _1c3={Command:"Resize",AppointmentID:args.Appointment._internalID,SourceSlotIndex:args.SourceSlotIndex,TargetSlotIndex:args.TargetSlotIndex,EditSeries:_1bf};
args.Scheduler.postback(_1c3);
}else{
args.Scheduler._restoreResizingAppointmentSize();
}
},_onAppointmentResizeAbortCallback:function(args){
args.Scheduler._restoreResizingAppointmentSize();
},_onResizeGripMouseClick:function(e){
e.stopPropagation();
},_onResizeGripMouseOver:function(e){
e.stopPropagation();
},_initializeModelTables:function(){
this._modelTables=new Array();
var _1c7=this.get_element().getElementsByTagName("table");
for(var i=0;i<_1c7.length;i++){
var _1c9=_1c7[i];
if(Sys.UI.DomElement.containsCssClass(_1c9,"rsContentTable")||Sys.UI.DomElement.containsCssClass(_1c9,"rsAllDayTable")||Sys.UI.DomElement.containsCssClass(_1c9,"rsTimelineTable")){
_1c9.targetRect=$telerik.getBounds(_1c9);
var _1ca=this._getTotalOffset(this.get_element());
_1c9.targetRect.x-=_1ca.left;
_1c9.targetRect.y-=_1ca.top;
var _1cb=$(this.get_contentElement()).find("div.rsContentScrollArea")[0];
if(_1cb&&$telerik.isDescendant(_1cb,_1c9)){
this._compensateScrollOffset(_1cb,_1c9);
}
var _1cc=_1c9.rows[0].cells[0];
_1c9.cellWidth=_1c9.targetRect.width/_1c9.rows[0].cells.length;
var _1cd=[];
$.each(_1c9.rows,function(){
Array.add(_1cd,this.cells[0].offsetHeight);
});
_1c9.cellHeights=_1cd;
Array.add(this._modelTables,_1c9);
}
}
return this._modelTables;
},_compensateScrollOffset:function(_1ce,_1cf){
var _1d0=$telerik.getScrollOffset(_1ce,false);
_1cf.targetRect.x+=_1d0.x;
_1cf.targetRect.y+=_1d0.y;
if($telerik.isSafari){
_1cf.targetRect.x+=_1d0.x;
_1cf.targetRect.y+=_1d0.y;
}
},_getTotalOffset:function(_1d1){
var _1d2=_1d1.offsetTop;
var _1d3=_1d1.offsetLeft;
var _1d4=_1d1.offsetParent;
while(_1d4){
_1d2+=_1d4.offsetTop;
_1d3+=_1d4.offsetLeft;
_1d4=_1d4.offsetParent;
}
return {top:_1d2,left:_1d3};
},_getCellFromCoordinates:function(_1d5,_1d6){
if(!this.get_element()){
return;
}
var _1d7=this._modelTables;
var _1d8=$("#"+this.get_element().id+" div.rsContentScrollArea:first")[0];
var _1d9=$telerik.getScrollOffset(_1d8,true);
var _1da=this._getTotalOffset(this.get_element());
for(var i=0,_1dc=_1d7.length;i<_1dc;i++){
var x=_1d5+_1d9.x;
var y=_1d6+_1d9.y;
var _1df=_1d7[i];
var _1e0={x:_1df.targetRect.x+_1da.left,y:_1df.targetRect.y+_1da.top,width:_1df.targetRect.width,height:_1df.targetRect.height};
var _1e1=_1e0.y+_1e0.height;
var _1e2=_1e0.x+_1e0.width;
if(x>=_1e0.x&&x<=_1e2&&y>=_1e0.y&&y<=_1e1){
var _1e3=this._getRowIndex(y,_1df,_1e0.y);
_1e3=Math.min(_1df.rows.length-1,Math.max(0,_1e3));
var _1e4=parseInt((x-_1e0.x)/_1df.cellWidth);
_1e4=Math.min(_1df.rows[_1e3].cells.length-1,Math.max(0,_1e4));
return _1df.rows[_1e3].cells[_1e4];
}
}
return null;
},_getRowIndex:function(_1e5,_1e6,_1e7){
var _1e8=0;
var _1e9=_1e6.cellHeights.length;
var _1ea=_1e7;
while(_1e8<_1e9){
var _1eb=_1ea+_1e6.cellHeights[_1e8];
if(_1ea<=_1e5&&_1e5<_1eb){
break;
}
_1ea=_1eb;
_1e8++;
}
return _1e8;
},_shouldStartDrag:function(_1ec){
if(!this._initialDragAppointment||!this._initialDragMousePos){
return false;
}
if(Math.abs(this._initialDragMousePos.x-_1ec.x)>4||Math.abs(this._initialDragMousePos.y-_1ec.y)>4){
return true;
}
},_onDocumentMouseMove:function(e){
var _1ee=this._getMousePosition(e);
if(!this._dragging&&this._shouldStartDrag(_1ee)){
this._startDrag(e);
}
if(!this._dragging||!this._draggingAppointment){
return;
}
Telerik.Web.UI.RadScheduler._clearSelection();
var _1ef=this._draggingAppointment.get_element();
var _1f0=this._getCellFromCoordinates(e.clientX,e.clientY-this._draggingOffset);
if(!_1f0||!_1f0.tagName||_1f0.tagName.toLowerCase()!="td"||_1f0.firstChild==_1ef.parentNode){
return;
}
$(_1ef.parentNode).removeClass(this._styles.dragTarget);
var _1f1=$(_1f0).find("div.rsWrap:first");
if(_1f1.length==0){
var cell=$(_1f0);
_1f1=$(_1ef.parentNode.cloneNode(false)).css({position:"absolute",top:cell[0].offsetTop,left:cell[0].offsetLeft,zIndex:cell.parent().parent()[0].rows.length-cell.parent()[0].rowIndex,width:cell.width(),height:"auto"});
_1f1.appendTo(cell);
}
if(this.get_selectedView()!=Telerik.Web.UI.SchedulerViewType.MonthView){
_1f1.append(_1ef);
}else{
if(_1f0.childNodes[1]){
_1f0.childNodes[1].appendChild(_1ef);
}
}
$(_1ef.parentNode).addClass(this._styles.dragTarget).css("display","");
var _1f3=this._activeModel.getTimeSlotFromDomElement(_1f0);
var args=new Telerik.Web.UI.SchedulerAppointmentMovingEventArgs(this._draggingAppointment,_1f3);
this.raiseEvent("appointmentMoving",args);
if(args.get_cancel()){
this._abortDrag(e);
}else{
this._keepElementInView(_1ef);
}
return true;
},_keepElementInView:function(_1f5,_1f6){
this._keepElementInViewHorizontal(_1f5,_1f6);
this._keepElementInViewVertical(_1f5,_1f6);
},_keepElementInViewHorizontal:function(_1f7,_1f8){
var _1f9=$("#"+this.get_element().id+" div.rsContentScrollArea")[0];
var _1fa=$("#"+this.get_element().id+" div.rsContent")[0];
var _1fb=this._getRelativeOffset(_1f9,_1fa);
var _1fc=this._getRelativeOffset(_1f7,_1fa);
_1fc.left-=_1fb.left;
_1fc.top-=_1fb.top;
var _1fd=_1f7.parentNode.parentNode.offsetWidth;
var _1fe=_1fc.left;
var _1ff=_1f7.offsetWidth;
var _200=_1fe+_1ff;
var _201=_1f9.clientWidth+_1f9.scrollLeft;
if(!_1f8&&_1fe<_1f9.scrollLeft){
_1f9.scrollLeft=_1fe;
}
if(_200>_201){
var _202=_1f9.scrollLeft+(_200-_201);
if((_1f9.clientWidth+_202)>_1f9.scrollWidth){
return;
}
if(!_1f8&&_202>_1fe){
_202=_1fe;
}
_1f9.scrollLeft=_202;
}
if(_1f8&&(_200-_1fd)<_1f9.scrollLeft){
_1f9.scrollLeft=_200-_1fd;
}
},_keepElementInViewVertical:function(_203,_204){
var _205=$("#"+this.get_element().id+" div.rsContentScrollArea")[0];
var _206=$("#"+this.get_element().id+" div.rsContent")[0];
var _207=this._getRelativeOffset(_205,_206);
var _208=this._getRelativeOffset(_203,_206);
_208.left-=_207.left;
_208.top-=_207.top;
var _209=_203.parentNode.parentNode.offsetHeight;
var _20a=_208.top;
var _20b=_203.offsetHeight;
var _20c=_20a+_20b;
var _20d=_205.clientHeight+_205.scrollTop;
if(!_204&&_20a<_205.scrollTop){
_205.scrollTop=_20a;
}
if(_20c>_20d){
var _20e=_205.scrollTop+(_20c-_20d);
if((_205.clientHeight+_20e)>_205.scrollHeight){
return;
}
if(!_204&&_20e>_20a){
_20e=_20a;
}
_205.scrollTop=_20e;
}
if(_204&&(_20c-_209)<_205.scrollTop){
_205.scrollTop=_20c-_209;
}
},_getRelativeOffset:function(_20f,_210){
var _211=_20f.offsetParent;
var _212=_20f.offsetTop;
var _213=_20f.offsetLeft;
while(_211!=_210){
_212+=_211.offsetTop;
_213+=_211.offsetLeft;
if(!_211.offsetParent){
break;
}
_211=_211.offsetParent;
}
return {top:_212,left:_213};
},_getMousePosition:function(e){
var _215=$telerik.getScrollOffset(document.body,true);
var _216=e.clientX;
var _217=e.clientY;
_216+=_215.x;
_217+=_215.y;
return {x:_216,y:_217};
},_onAppointmentMouseDown:function(e){
if(this.get_readOnly()){
return;
}
var _219=this.getAppointmentFromDomElement(e.eventMapTarget);
var _21a=(_219.get_allowEdit()!=null)?_219.get_allowEdit():this.get_allowEdit();
if(!_21a){
return;
}
this._initialDragMousePos=this._getMousePosition(e);
this._initialDragAppointment=_219;
$addHandler(document,"selectstart",this._onSelectStartDelegate);
$addHandler(document,"mouseup",this._onDocMouseUpDelegate);
$addHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=true;
},_startDrag:function(e){
var _21c=this._initialDragAppointment;
var _21d=this._getCellFromCoordinates(e.clientX,e.clientY);
if(!_21d){
return;
}
var _21e=new Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs(_21c);
this.raiseEvent("appointmentMoveStart",_21e);
if(_21e.get_cancel()){
return;
}
this._draggingAppointment=_21c;
this._dragging=true;
var _21f=this._draggingAppointment.get_element();
var _220=$telerik.getLocation(_21f);
if($telerik.isFirefox||$telerik.isSafari){
var _221=$telerik.getScrollOffset(_21f,true);
_220.x-=_221.x;
_220.y-=_221.y;
if($telerik.isFirefox){
_220.x+=document.body.parentNode.scrollLeft;
_220.y+=document.body.parentNode.scrollTop;
}else{
_220.x+=document.body.scrollLeft;
_220.y+=document.body.scrollTop;
}
}
var _222=$telerik.getLocation(_21d);
var _223=e.clientY-_220.y;
var _224=e.clientY-_222.y;
this._draggingOffset=_223-_224;
if($telerik.isFirefox&&document.compatMode=="BackCompat"){
this._draggingOffset=0;
}
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView||this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.TimelineView){
this._draggingOffset=0;
}
_21c._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,_229){
if(this._dragHandlersAttached){
$removeHandler(document,"selectstart",this._onSelectStartDelegate);
$removeHandler(document,"mouseup",this._onDocMouseUpDelegate);
$removeHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=false;
}
if(this._dragging){
var _22a=this._draggingAppointment.get_element();
if(!_229&&_22a.parentNode&&_22a.parentNode.parentNode){
var _22b=_22a.parentNode.parentNode;
this._draggingAppointment._endDrag(_22b);
}else{
this._draggingAppointment._abortDrag();
}
this._draggingAppointment=null;
this._dragging=false;
Sys.UI.DomElement.removeCssClass(_22a.parentNode,this._styles.dragTarget);
e.preventDefault();
e.stopPropagation();
}
},_onAppointmentDoubleClick:function(e){
if(this._resizingState.resizing){
this._resizingState.resizing=false;
e.stopPropagation();
return;
}
Telerik.Web.UI.RadScheduler._clearSelection();
var _22d=this.getAppointmentFromDomElement(e.eventMapTarget);
var _22e=new Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs(_22d);
this.raise_appointmentDoubleClick(_22e);
this._editAppointmentInline(_22d);
$telerik.cancelRawEvent(e);
return false;
},_editAppointmentInline:function(_22f){
if(this.get_readOnly()){
return;
}
if(_22f){
var _230=(_22f.get_allowEdit()!=null)?_22f.get_allowEdit():this.get_allowEdit();
if(!_230){
return;
}
var args={OnConfirm:this._onAppointmentEditCallback,Scheduler:this,Appointment:_22f,CallbackIsCalledFromDialog:true};
if(_22f._recurrenceState==1||_22f._recurrenceState==2||_22f._recurrenceState==3){
var _232=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Edit);
this.raise_recurrenceActionDialogShowing(_232);
if(_232.get_cancel()){
var _233=_232.get_editSeries();
if(_233!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(_233,args);
}
}else{
Telerik.Web.UI.RecurrenceActionDialog.Show(Telerik.Web.UI.RecurrenceAction.Edit,args);
}
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(false,args);
}
}
},_onAppointmentEditCallback:function(_234,args){
if(args.CallbackIsCalledFromDialog){
var _236=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Edit,_234);
args.Scheduler.raise_recurrenceActionDialogClosed(_236);
}
var _237=new Telerik.Web.UI.SchedulerAppointmentEditingEventArgs(args.Appointment,_234);
args.Scheduler.raise_appointmentEditing(_237);
if(_237.get_cancel()==false){
args.Scheduler.editAppointment(args.Appointment,_234);
}
},_onShowMoreClick:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _23a={Command:"SwitchToSelectedDay",SourceSlotIndex:slot.get_index()};
this.postback(_23a);
},_onAppointmentMouseOver:function(e){
if(this._resizingState.resizing||this._dragging){
e.stopPropagation();
return;
}
var _23c=this.getAppointmentDomElement(e.eventMapTarget);
var _23d=this.getAppointmentFromDomElement(_23c);
var _23e=(_23d.get_allowDelete()!=null)?_23d.get_allowDelete():this.get_allowDelete();
if(!_23e){
return;
}
this._hoveredAppointmentElement=_23c;
var _23f=$telerik.getElementByClassName(_23c,"rsAptDelete","a");
if(_23f){
_23f.style.visibility="visible";
}
},_onAppointmentMouseOut:function(e){
var _241=e.rawEvent.relatedTarget?e.rawEvent.relatedTarget:e.rawEvent.toElement;
if(!_241||$telerik.isDescendant(this._hoveredAppointmentElement,_241)){
return;
}else{
var _242=this.getAppointmentDomElement(e.eventMapTarget);
var _243=$telerik.getElementByClassName(_242,"rsAptDelete","a");
if(_243){
_243.style.visibility="hidden";
}
}
},_onCellClick:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.target);
if(!slot){
return;
}
var _246=new Telerik.Web.UI.SchedulerTimeSlotClickEventArgs(slot.get_startTime(),slot,e);
this.raise_timeSlotClick(_246);
},_onCellContextMenu:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.target);
if(!slot){
return;
}
var _249=new Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs(slot.get_startTime(),slot.get_isAllDay(),e,slot);
this.raise_timeSlotContextMenu(_249);
},_onCellDoubleClick:function(e){
if(!this.get_readOnly()&&this.get_allowInsert()){
var slot=this._activeModel.getTimeSlotFromDomElement(e.target);
var _24c=new Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs(slot.get_startTime(),slot.get_isAllDay(),slot);
this.raise_appointmentInserting(_24c);
if(_24c.get_cancel()==false){
this.showInsertFormAt(slot);
}
}
return false;
},_onAppointmentDeleteClick:function(e){
if(!this.get_readOnly()){
var _24e=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_24e){
var args={OnConfirm:this._onAppointmentDeleteCallback,Scheduler:this,Appointment:_24e,CallbackIsCalledFromDialog:true};
if(_24e._recurrenceState==1||_24e._recurrenceState==2||_24e._recurrenceState==3){
var _250=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Delete);
this.raise_recurrenceActionDialogShowing(_250);
if(_250.get_cancel()){
var _251=_250.get_editSeries();
if(_251!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(_251,args);
}
}else{
Telerik.Web.UI.RecurrenceActionDialog.Show(Telerik.Web.UI.RecurrenceAction.Delete,args);
}
}else{
if(this.get_displayDeleteConfirmation()){
var _252=this.get_localization();
var _253=$telerik.$.modal("#"+this.get_element().id+">.rsTopWrap");
_253.initialize().set_content({title:_252.ConfirmDeleteTitle,content:_252.ConfirmDeleteText,ok:_252.ConfirmOK,cancel:_252.ConfirmCancel}).set_onActionConfirm(function(_254){
args.OnConfirm(false,args);
}).show();
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(false,args);
}
}
}
}
e.stopPropagation();
e.preventDefault();
},_onAppointmentDeleteCallback:function(_255,args){
if(args.CallbackIsCalledFromDialog){
var _257=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Delete,_255);
args.Scheduler.raise_recurrenceActionDialogClosed(_257);
}
var _258=new Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs(args.Appointment,_255);
args.Scheduler.raise_appointmentDeleting(_258);
if(_258.get_cancel()==false){
var _259={Command:"Delete",AppointmentID:args.Appointment._internalID,EditSeries:_255};
args.Scheduler.postback(_259);
}
},_onPreviousDayClick:function(e){
var _25b=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_25b){
var _25c={Command:"GoToPrevious",AppointmentID:_25b._internalID};
this.postback(_25c);
}
e.stopPropagation();
e.preventDefault();
},_onNextDayClick:function(e){
var _25e=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_25e){
var _25f={Command:"GoToNext",AppointmentID:_25e._internalID};
this.postback(_25f);
}
e.stopPropagation();
e.preventDefault();
},_onDayViewTabClick:function(e){
var _261={Command:"SwitchToDayView"};
this.postback(_261);
e.stopPropagation();
e.preventDefault();
},_onWeekViewTabClick:function(e){
var _263={Command:"SwitchToWeekView"};
this.postback(_263);
e.stopPropagation();
e.preventDefault();
},_onMonthViewTabClick:function(e){
var _265={Command:"SwitchToMonthView"};
this.postback(_265);
e.stopPropagation();
e.preventDefault();
},_onTimelineViewTabClick:function(e){
var _267={Command:"SwitchToTimelineView"};
this.postback(_267);
e.stopPropagation();
e.preventDefault();
},_onMultiDayViewTabClick:function(e){
var _269={Command:"SwitchToMultiDayView"};
this.postback(_269);
e.stopPropagation();
e.preventDefault();
},_onPreviousSchedulerDayClick:function(e){
var _26b={Command:"NavigateToPreviousPeriod"};
this.postback(_26b);
e.stopPropagation();
e.preventDefault();
},_onNextSchedulerDayClick:function(e){
var _26d={Command:"NavigateToNextPeriod"};
this.postback(_26d);
e.stopPropagation();
e.preventDefault();
},_onTodayClick:function(e){
var _26f={Command:"GoToToday"};
this.postback(_26f);
e.stopPropagation();
e.preventDefault();
},_onFullTimeLinkClick:function(e){
var _271={Command:"SwitchFullTime"};
this.postback(_271);
e.stopPropagation();
e.preventDefault();
},postback:function(args){
this._onContentScroll();
var _273=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _274=this.get_postBackReference().replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(args));
eval(_274);
},_getElementIndex:function(_275,_276){
if(!_275){
return;
}
for(var i=0;i<_275.length;i++){
if(_275[i]===_276){
return i;
}
}
return -1;
},_getInlineTemplate:function(){
if(!this._inlineTemplate){
this._inlineTemplate=new Telerik.Web.UI.InlineTemplate(this.get_element(),this.get_localization(),this._enableAdvancedForm,this.get_minimumInlineFormWidth(),this.get_minimumInlineFormHeight());
if(this._defaultInlineFormRendered){
var _278=$("#"+this.get_element().id+" .rsAptEditSizingWrapper");
if(_278.length){
this._inlineTemplate.attachTo(_278[0]);
}
}
var _279=Function.createDelegate(this,this._inlineFormSaveClicked);
this._inlineTemplate.add_saveClicked(_279);
var _27a=Function.createDelegate(this,this._inlineFormMoreClicked);
this._inlineTemplate.add_moreClicked(_27a);
}
return this._inlineTemplate;
},_inlineFormSaveClicked:function(_27b,_27c){
var apt=this._extractAppointmentFromInlineTemplate(_27b);
if(_27b.get_isInsert()){
this.insertAppointment(apt);
}else{
apt._internalID=_27b.get_appointmentInternalID();
this.updateAppointment(apt,_27b.get_editSeries());
}
},_inlineFormMoreClicked:function(_27e,_27f){
var apt=this._extractAppointmentFromInlineTemplate(_27e);
if(_27e.get_isInsert()){
this._showAdvancedInsertForm(apt);
}else{
apt._internalID=_27e.get_appointmentInternalID();
this._showAdvancedEditForm(apt,_27e.get_editSeries());
}
},_extractAppointmentFromInlineTemplate:function(_281){
var _282=_281.get_element();
if(_282.originalParent){
_282=_282.originalParent;
}
var _283=_281.get_start();
var _284=_281.get_end();
var _285;
if(!_283&&!_284){
var _286=this._activeModel.getTimeSlotFromDomElement(_282);
if(!_286.get_isAllDay()){
_283=_286.get_startTime();
_284=new Date(_283.getTime());
Telerik.Web.UI.RadScheduler._incrementTime(_284,0,this.get_minutesPerRow()*this.get_numberOfHoveredRows());
}else{
_283=new Date(_286.get_startTime());
_283.setHours(0,0,0,0);
_284=new Date(_283.getTime());
Telerik.Web.UI.RadScheduler._incrementTime(_284,24);
}
if(_286.get_resource){
_285=_286.get_resource();
}
}
var apt=new Telerik.Web.UI.SchedulerAppointment();
apt.set_subject(_281.get_text());
apt.set_start(_283);
apt.set_end(_284);
if(_285){
apt.get_resources().add(_285);
}
return apt;
},_showAdvancedInsertForm:function(_288){
var _289={command:"AdvancedInsert",appointment:this._getSerializableAppointment(_288),startDate:_288.get_start().format("yyyyMMddHHmm"),endDate:_288.get_end().format("yyyyMMddHHmm")};
this.postback(_289);
},_showAdvancedEditForm:function(_28a,_28b){
var _28c={command:"AdvancedEdit",appointmentID:_28a._internalID,appointment:this._getSerializableAppointment(_28a),startDate:_28a.get_start().format("yyyyMMddHHmm"),endDate:_28a.get_end().format("yyyyMMddHHmm"),editSeries:_28b};
this.postback(_28c);
},add_appointmentClick:function(_28d){
this.get_events().addHandler("AppointmentClick",_28d);
},remove_appointmentClick:function(_28e){
this.get_events().removeHandler("AppointmentClick",_28e);
},raise_appointmentClick:function(args){
this.raiseEvent("AppointmentClick",args);
},add_appointmentInserting:function(_290){
this.get_events().addHandler("AppointmentInserting",_290);
},remove_appointmentInserting:function(_291){
this.get_events().removeHandler("AppointmentInserting",_291);
},raise_appointmentInserting:function(_292){
this.raiseEvent("AppointmentInserting",_292);
},add_appointmentDoubleClick:function(_293){
this.get_events().addHandler("AppointmentDoubleClick",_293);
},remove_appointmentDoubleClick:function(_294){
this.get_events().removeHandler("AppointmentDoubleClick",_294);
},raise_appointmentDoubleClick:function(_295){
this.raiseEvent("AppointmentDoubleClick",_295);
},add_appointmentResizeStart:function(_296){
this.get_events().addHandler("AppointmentResizeStart",_296);
},remove_appointmentResizeStart:function(_297){
this.get_events().removeHandler("AppointmentResizeStart",_297);
},raise_appointmentResizeStart:function(args){
this.raiseEvent("AppointmentResizeStart",args);
},add_appointmentResizeEnd:function(_299){
this.get_events().addHandler("AppointmentResizeEnd",_299);
},remove_appointmentResizeEnd:function(_29a){
this.get_events().removeHandler("AppointmentResizeEnd",_29a);
},raise_appointmentResizeEnd:function(args){
this.raiseEvent("AppointmentResizeEnd",args);
},add_appointmentResizing:function(_29c){
this.get_events().addHandler("AppointmentResizing",_29c);
},remove_appointmentResizing:function(_29d){
this.get_events().removeHandler("AppointmentResizing",_29d);
},raise_appointmentResizing:function(args){
this.raiseEvent("AppointmentResizing",args);
},add_appointmentDeleting:function(_29f){
this.get_events().addHandler("AppointmentDeleting",_29f);
},remove_appointmentDeleting:function(_2a0){
this.get_events().removeHandler("AppointmentDeleting",_2a0);
},raise_appointmentDeleting:function(args){
this.raiseEvent("AppointmentDeleting",args);
},add_timeSlotClick:function(_2a2){
this.get_events().addHandler("TimeSlotClick",_2a2);
},remove_timeSlotClick:function(_2a3){
this.get_events().removeHandler("TimeSlotClick",_2a3);
},raise_timeSlotClick:function(args){
this.raiseEvent("TimeSlotClick",args);
},add_appointmentEditing:function(_2a5){
this.get_events().addHandler("AppointmentEditing",_2a5);
},remove_appointmentEditing:function(_2a6){
this.get_events().removeHandler("AppointmentEditing",_2a6);
},raise_appointmentEditing:function(args){
this.raiseEvent("AppointmentEditing",args);
},add_appointmentMoveStart:function(_2a8){
this.get_events().addHandler("appointmentMoveStart",_2a8);
},remove_appointmentMoveStart:function(_2a9){
this.get_events().removeHandler("appointmentMoveStart",_2a9);
},add_appointmentMoving:function(_2aa){
this.get_events().addHandler("appointmentMoving",_2aa);
},remove_appointmentMoving:function(_2ab){
this.get_events().removeHandler("appointmentMoving",_2ab);
},add_appointmentMoveEnd:function(_2ac){
this.get_events().addHandler("appointmentMoveEnd",_2ac);
},remove_appointmentMoveEnd:function(_2ad){
this.get_events().removeHandler("appointmentMoveEnd",_2ad);
},add_recurrenceActionDialogShowing:function(_2ae){
this.get_events().addHandler("RecurrenceActionDialogShowing",_2ae);
},remove_recurrenceActionDialogShowing:function(_2af){
this.get_events().removeHandler("RecurrenceActionDialogShowing",_2af);
},raise_recurrenceActionDialogShowing:function(args){
this.raiseEvent("RecurrenceActionDialogShowing",args);
},add_recurrenceActionDialogClosed:function(_2b1){
this.get_events().addHandler("RecurrenceActionDialogClosed",_2b1);
},remove_recurrenceActionDialogClosed:function(_2b2){
this.get_events().removeHandler("RecurrenceActionDialogClosed",_2b2);
},raise_recurrenceActionDialogClosed:function(args){
this.raiseEvent("RecurrenceActionDialogClosed",args);
},add_formCreated:function(_2b4){
this.get_events().addHandler("FormCreated",_2b4);
},remove_formCreated:function(_2b5){
this.get_events().removeHandler("FormCreated",_2b5);
},raise_formCreated:function(args){
this.raiseEvent("FormCreated",args);
},add_appointmentContextMenu:function(_2b7){
this.get_events().addHandler("AppointmentContextMenu",_2b7);
},remove_appointmentContextMenu:function(_2b8){
this.get_events().removeHandler("AppointmentContextMenu",_2b8);
},raise_appointmentContextMenu:function(args){
this.raiseEvent("AppointmentContextMenu",args);
},add_timeSlotContextMenu:function(_2ba){
this.get_events().addHandler("TimeSlotContextMenu",_2ba);
},remove_timeSlotContextMenu:function(_2bb){
this.get_events().removeHandler("TimeSlotContextMenu",_2bb);
},raise_timeSlotContextMenu:function(args){
this.raiseEvent("TimeSlotContextMenu",args);
}};
})($telerik.$);
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");
(function($){
Telerik.Web.UI.RecurrenceActionDialog=function(){
};
Telerik.Web.UI.RecurrenceActionDialog.Show=function(_2be,args){
var _2c0=args.Scheduler.get_localization();
var _2c1="";
var _2c2="";
var _2c3="";
switch(_2be){
case Telerik.Web.UI.RecurrenceAction.Delete:
_2c1=_2c0.ConfirmRecurrenceDeleteOccurrence;
_2c2=_2c0.ConfirmRecurrenceDeleteSeries;
_2c3=_2c0.ConfirmRecurrenceDeleteTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Edit:
_2c1=_2c0.ConfirmRecurrenceEditOccurrence;
_2c2=_2c0.ConfirmRecurrenceEditSeries;
_2c3=_2c0.ConfirmRecurrenceEditTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Resize:
_2c1=_2c0.ConfirmRecurrenceResizeOccurrence;
_2c2=_2c0.ConfirmRecurrenceResizeSeries;
_2c3=_2c0.ConfirmRecurrenceResizeTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Move:
_2c1=_2c0.ConfirmRecurrenceMoveOccurrence;
_2c2=_2c0.ConfirmRecurrenceMoveSeries;
_2c3=_2c0.ConfirmRecurrenceMoveTitle;
break;
}
var _2c4=$.modal("#"+args.Scheduler.get_element().id+">.rsTopWrap");
var _2c5=["<label><input type=\"radio\" id=\"choiceOccurrenceSpan_0\" name=\"choiceOccurrenceSpan\" value=\"occurrence\" checked=\"checked\" />",_2c1,"</label>","<label><input type=\"radio\" id=\"choiceOccurrenceSpan_1\" name=\"choiceOccurrenceSpan\" value=\"series\" />",_2c2,"</label>"];
_2c4.initialize().set_content({title:_2c3,content:_2c5.join(""),ok:_2c0.ConfirmOK,cancel:_2c0.ConfirmCancel}).set_onActionConfirm(function(e,_2c7){
var _2c8=$(_2c7).find("input[name=choiceOccurrenceSpan]:checked").val()=="series";
args.OnConfirm(_2c8,args);
_2c4.dispose();
}).set_onActionCancel(function(){
if(args.OnCancel){
args.OnCancel(args);
}
_2c4.dispose();
}).show();
};
})($telerik.$);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerResource=function(_2c9){
this._key=_2c9.key;
this._type=_2c9.type;
this._text=_2c9.text;
this._internalKey=_2c9.internalKey;
this._available=_2c9.available;
this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection(this);
if(typeof (_2c9.attributes)!="undefined"){
this._attributes._load(_2c9.attributes);
}
};
Telerik.Web.UI.SchedulerResource.prototype={get_key:function(){
return this._key;
},get_type:function(){
return this._type;
},get_text:function(){
return this._text;
},get_available:function(){
return this._available;
},_getInternalKey:function(){
return this._internalKey;
},get_attributes:function(){
return this._attributes;
}};
Telerik.Web.UI.SchedulerResource.registerClass("Telerik.Web.UI.SchedulerResource");
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerResourceCollection=function(){
this._array=new Array();
};
Telerik.Web.UI.SchedulerResourceCollection.prototype={add:function(item){
var _2cb=this._array.length;
this.insert(_2cb,item);
},insert:function(_2cc,item){
Array.insert(this._array,_2cc,item);
},remove:function(item){
Array.remove(this._array,item);
},removeAt:function(_2cf){
var item=this.getAppointment(_2cf);
if(item){
this.remove(item);
}
},clear:function(){
this._array=new Array();
},get_count:function(){
return this._array.length;
},forEach:function(_2d1){
for(var i=0,_2d3=this.get_count();i<_2d3;i++){
_2d1(this.getResource(i));
}
},getResource:function(_2d4){
return this._array[_2d4];
},getResourcesByType:function(type){
var _2d6=new Telerik.Web.UI.SchedulerResourceCollection();
this.forEach(function(_2d7){
if(_2d7.get_type()==type){
_2d6.add(_2d7);
}
});
return _2d6;
}};
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,_2da){
this._add(key,_2da);
var _2db={};
_2db[key]=_2da;
},_add:function(key,_2dd){
if(Array.indexOf(this._keys,key)<0){
Array.add(this._keys,key);
}
this._data[key]=_2dd;
},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(_2e1){
throw Error.notImplemented();
},updateResizingAppointmentSize:function(_2e2,_2e3){
}};
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();
},get_duration:function(){
throw Error.notImplemented();
},get_domElement:function(){
throw Error.notImplemented();
}};
Telerik.Web.UI.ISchedulerTimeSlot.registerInterface("Telerik.Web.UI.ISchedulerTimeSlot");

