﻿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;
};
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();
});
if(_120>_11e.contentWrapper.find("table.rsContentTable, table.rsAllDayTable").height()){
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(_121){
var _122=_121.contentWrapper.add(_121.schedulerTopWrap.find("td.rsHorizontalHeaderWrapper").children().get()).add(_121.contentWrapper.children()[0]);
if($telerik.isIE){
_121.scheduler.css("overflow-x","hidden");
_121.schedulerTopWrap.width(_121.scheduler.width()-2);
_121.scheduler.css("overflow-x","");
}else{
_121.schedulerTopWrap.width(_121.scheduler.width()-2);
}
_122.width("100%");
var _123=_121.scheduler.width()-_121.verticalHeaderWrapper.width();
_122.width(_123-2);
};
Telerik.Web.UI.RadScheduler._clearSelection=function(){
if(document.selection&&document.selection.clear){
document.selection.clear();
}else{
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 _124=this.get_element();
var _125=$(_124);
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=_125.find("td.rsHorizontalHeaderWrapper").children().children();
this._verticalScrollAreas=_125.find(".rsVerticalHeaderTable");
if(_125.find(".rsTopWrap").length==0){
if(typeof (Telerik.Web.UI.Scheduling)!="undefined"&&typeof (Telerik.Web.UI.Scheduling.AdvancedTemplate)!="undefined"&&this._enableAdvancedTemplateScript){
var _126=this.get_element().id;
this._advancedTemplate=new Telerik.Web.UI.Scheduling.AdvancedTemplate(_126,_126+"_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=_125.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 _127=$find(this.get_element().id+"_SelectedDateCalendar");
if(!_127){
return;
}
_127.add_calendarViewChanging(function(_128,_129){
_128.set_autoPostBack(false);
});
_127.add_calendarViewChanged(function(_12a,_12b){
_12a.set_autoPostBack(true);
});
},_initializeAdvancedTemplate:function(){
if(this._advancedTemplate){
this._advancedTemplate.initialize();
}
Sys.Application.remove_load(this._initializeAdvancedTemplateCallback);
},dispose:function(){
var _12c=this.get_element();
if(this._onKeyboardEventDelegate){
$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
}
var _12d=this.get_contentElement();
if(_12d){
$clearHandlers(_12d);
}
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(_12e){
this._appointments=new Telerik.Web.UI.SchedulerAppointmentCollection(this);
var _12f=eval("("+_12e+")");
for(var i=0;i<_12f.length;i++){
var _131=new Telerik.Web.UI.SchedulerAppointment(_12f[i],this);
this._appointments.add(_131);
}
},get_resources:function(){
return this._resources;
},set_resources:function(_132){
this._resources=new Telerik.Web.UI.SchedulerResourceCollection();
var _133=Sys.Serialization.JavaScriptSerializer.deserialize(_132);
for(var i=0;i<_133.length;i++){
var _135=new Telerik.Web.UI.SchedulerResource(_133[i]);
this._resources.add(_135);
}
},get_firstDayStart:function(){
return this._firstDayStart;
},set_firstDayStart:function(_136){
this._firstDayStart=new Date(Date.parse(_136));
},get_currentAppointment:function(){
return this._currentAppointment;
},set_currentAppointment:function(_137){
var _138=Sys.Serialization.JavaScriptSerializer.deserialize(_137);
this._currentAppointment=new Telerik.Web.UI.SchedulerAppointment(_138,this,null);
},get_localization:function(){
return this._localization;
},set_localization:function(_139){
this._localization=Sys.Serialization.JavaScriptSerializer.deserialize(_139);
},get_scrollTop:function(){
return this._scrollTop;
},set_scrollTop:function(_13a){
this._scrollTop=_13a;
},get_scrollLeft:function(){
return this._scrollLeft;
},set_scrollLeft:function(_13b){
this._scrollLeft=_13b;
},get_displayDeleteConfirmation:function(){
return this._displayDeleteConfirmation;
},set_displayDeleteConfirmation:function(_13c){
this._displayDeleteConfirmation=_13c;
},get_displayRecurrenceActionDialogOnMove:function(){
return this._displayRecurrenceActionDialogOnMove;
},set_displayRecurrenceActionDialogOnMove:function(_13d){
this._displayRecurrenceActionDialogOnMove=_13d;
},get_shouldPostbackOnClick:function(){
return this._shouldPostbackOnClick;
},set_shouldPostbackOnClick:function(_13e){
this._shouldPostbackOnClick=_13e;
},get_shouldUseClientInlineInsertForm:function(){
return this._shouldUseClientInlineInsertForm;
},set_shouldUseClientInlineInsertForm:function(_13f){
this._shouldUseClientInlineInsertForm=_13f;
},get_shouldUseClientInlineEditForm:function(){
return this._shouldUseClientInlineEditForm;
},set_shouldUseClientInlineEditForm:function(_140){
this._shouldUseClientInlineEditForm=_140;
},get_defaultInlineFormRendered:function(){
return this._defaultInlineFormRendered;
},set_defaultInlineFormRendered:function(_141){
this._defaultInlineFormRendered=_141;
},get_overflowBehavior:function(){
return this._overflowBehavior;
},set_overflowBehavior:function(_142){
this._overflowBehavior=_142;
},get_readOnly:function(){
return this._readOnly;
},set_readOnly:function(_143){
this._readOnly=_143;
},get_selectedView:function(){
return this._selectedView;
},set_selectedView:function(_144){
this._selectedView=_144;
},get_minutesPerRow:function(){
return this._minutesPerRow;
},set_minutesPerRow:function(_145){
this._minutesPerRow=_145;
},get_postBackReference:function(){
return this._postBackReference;
},set_postBackReference:function(_146){
this._postBackReference=_146;
},get_allowEdit:function(){
return this._allowEdit;
},set_allowEdit:function(_147){
this._allowEdit=_147;
},get_allowDelete:function(){
return this._allowDelete;
},set_allowDelete:function(_148){
this._allowDelete=_148;
},get_allowInsert:function(){
return this._allowInsert;
},set_allowInsert:function(_149){
this._allowInsert=_149;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_14a){
this._attributes._load(_14a);
},get_activeModel:function(){
return this._activeModel;
},set_numberOfHoveredRows:function(_14b){
this._numberOfHoveredRows=_14b;
},get_numberOfHoveredRows:function(){
return this._numberOfHoveredRows;
},set_groupBy:function(_14c){
this._groupBy=_14c;
},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(_14d){
this._minimumInlineFormWidth=_14d;
},get_minimumInlineFormHeight:function(){
return this._minimumInlineFormHeight;
},set_minimumInlineFormHeight:function(_14e){
this._minimumInlineFormHeight=_14e;
},showInsertFormAt:function(_14f){
if(this.get_shouldUseClientInlineInsertForm()){
if(this._datePickerCalendarExpanded){
this._onDatePickerToggle();
}
var _150=this._getInlineTemplate();
_150.instantiateIn(_14f.get_domElement());
_150.set_text("");
_150.set_isInsert(true);
this._fireFormCreated();
return;
}
var _151=_14f.get_domElement().offsetWidth;
var _152=_14f.get_domElement().offsetHeight;
var _153={command:"Insert",appointmentID:-1,targetSlotIndex:_14f.get_index(),slotWidth:_151,slotHeight:_152};
this.postback(_153);
},insertAppointment:function(_154){
var _155={command:"InsertAppointment",appointment:this._getSerializableAppointment(_154),startDate:_154.get_start().format("yyyyMMddHHmm"),endDate:_154.get_end().format("yyyyMMddHHmm")};
this.postback(_155);
},updateAppointment:function(_156,_157){
var _158={command:"UpdateAppointment",appointmentID:_156._internalID,appointment:this._getSerializableAppointment(_156),startDate:_156.get_start().format("yyyyMMddHHmm"),endDate:_156.get_end().format("yyyyMMddHHmm"),editSeries:_157};
this.postback(_158);
},editAppointment:function(_159,_15a){
var slot=_159.get_element().parentNode.parentNode;
if(this.get_shouldUseClientInlineEditForm()){
if(this._datePickerCalendarExpanded){
this._onDatePickerToggle();
}
var _15c=this._getInlineTemplate();
_15c.instantiateIn(_159.get_element());
_15c.set_appointmentInternalID(_159._internalID);
_15c.set_text(_159.get_subject());
_15c.set_start(_159.get_start());
_15c.set_end(_159.get_end());
_15c.set_editSeries(_15a);
_15c.set_isInsert(false);
this._fireFormCreated();
return;
}
var _15d=slot.offsetWidth;
var _15e=slot.offsetHeight;
var _15f={command:"Edit",appointmentID:_159._internalID,editSeries:_15a,slotWidth:_15d,slotHeight:_15e};
this.postback(_15f);
},deleteAppointment:function(_160,_161){
var _162={command:"Delete",appointmentID:_160._internalID,editSeries:_161};
this.postback(_162);
},getAppointmentDomElement:function(_163){
while(_163&&!Sys.UI.DomElement.containsCssClass(_163,"rsApt")){
_163=_163.parentNode;
}
return _163;
},getAppointmentFromDomElement:function(_164){
if(!_164){
return null;
}
var _165=this.getAppointmentDomElement(_164);
var _166=this.get_appointments();
for(var i=0;i<_166.get_count();i++){
var _168=_166.getAppointment(i);
if(!_168.get_element()){
continue;
}
for(var _169=0;_169<_168._domElements.length;_169++){
if(_165.id==_168._domElements[_169]){
return _168;
}
}
}
return null;
},saveClientState:function(){
return "{\"scrollTop\":"+this._scrollTop+",\"scrollLeft\":"+this._scrollLeft+"}";
},_getSerializableAppointment:function(_16a){
var _16b=_16a.get_subject().replace(/'/g,"&squote");
_16b=encodeURIComponent(_16b);
return {ID:_16a._internalID,Subject:_16b,Resources:this._getSerializableResources(_16a.get_resources()),RecurrenceState:_16a.get_recurrenceState(),RecurrenceParentID:_16a.get_recurrenceParentID()};
},_getSerializableResources:function(_16c){
var _16d=[];
for(var i=0;i<_16c.get_count();i++){
var _16f=_16c.getResource(i);
_16d[_16d.length]={Key:_16f.get_key(),Text:_16f.get_text(),Type:_16f.get_type(),Available:_16f.get_available()};
}
return _16d;
},_onAppointmentInserting:function(_170){
this._blockCollection.add(_170);
},_onAppointmentRemove:function(_171){
this._blockCollection.remove(_171);
},_onAppointmentsClear:function(){
this._blockCollection=new Telerik.Web.UI.SchedulerRendering.BlockCollection();
},_fireFormCreated:function(){
var _172=$("#"+this.get_element().id);
var _173=_172.find("div.rsAptEditFormInner");
if(_173.length==0){
_173=_172.find("div.rsAdvancedEdit");
}
if(_173.length>0){
var args=new Telerik.Web.UI.SchedulerFormCreatedEventArgs(this.get_currentAppointment(),_173[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 _177=$(this.get_element()).find("div.rsDatePickerWrapper");
var _178=_177.find("div:first");
var _179=_178.find("table:first");
var _17a=this.get_element().offsetWidth+"px";
_178.stop().css({position:"absolute",overflow:"hidden",width:_17a}).css({width:_179.width()+"px"});
_177.css("overflow","visible");
if(!this._datePickerCalendarExpanded){
var _17b=this._getInlineTemplate();
if(_17b.get_element()){
_17b.hide();
}
_178.animate({height:_179.height()+"px"},300,"easeInQuart");
}else{
_178.animate({height:"0px"},300,"easeOutQuart",function(){
_177.css("overflow","hidden");
});
}
this._datePickerCalendarExpanded=!this._datePickerCalendarExpanded;
if(e){
e.preventDefault();
}
return false;
},_onContentScroll:function(e){
var _17d=this._contentScrollArea;
if(!_17d){
return;
}
if(this._horizontalScrollAreas.length){
if($telerik.isIE6){
this._horizontalScrollAreas.css("margin-left",-_17d.scrollLeft+"px");
}else{
this._horizontalScrollAreas.scrollLeft(_17d.scrollLeft);
}
}
if(this._verticalScrollAreas.length){
this._verticalScrollAreas.css("margin-top",-_17d.scrollTop+"px");
}
var _17e=this._getInlineTemplate().get_element();
if(_17e&&_17e.detached){
_17e.style.left=_17e.originalLeft-_17d.scrollLeft+"px";
}
this._scrollLeft=_17d.scrollLeft;
this._scrollTop=_17d.scrollTop;
this.updateClientState();
},_onAppointmentClick:function(e){
var _180=this.getAppointmentFromDomElement(e.eventMapTarget);
var _181=new Telerik.Web.UI.SchedulerAppointmentClickEventArgs(_180);
this.raise_appointmentClick(_181);
if(this.get_readOnly()&&this.get_shouldPostbackOnClick()){
var _182={Command:"Click",AppointmentID:_180._internalID,EditSeries:false};
this.postback(_182);
}
return false;
},_onAppointmentContextMenu:function(e){
var _184=this.getAppointmentFromDomElement(e.eventMapTarget);
var _185=new Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs(_184,e);
this.raise_appointmentContextMenu(_185);
},_onEditFormClick:function(e){
e.stopPropagation();
},_getHourCellFromDomElement:function(_187){
var _188=_187;
while(_188.tagName.toLowerCase()!="th"){
_188=_188.parentNode;
}
return _188;
},_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){
return;
}
this._removeRowHover();
var _18b=$(e.target);
while(!(_18b.is("td")&&_18b.parents("table:first").is(".rsContentTable, .rsAllDayTable"))){
_18b=_18b.parent();
if(_18b.length==0){
return;
}
}
var _18c=this.get_numberOfHoveredRows();
if(_18b.parents("table").is(".rsAllDayTable")||this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.MonthView){
_18c=1;
}
this._currentHoverCell=_18b[0];
var _18d=[this._currentHoverCell];
for(var i=1;i<_18c;i++){
var _18f=this._getNextRowCell(_18d[i-1]);
if(_18f){
_18d[i]=_18f;
}else{
break;
}
}
$.each(_18d,function(){
$(this).addClass("rsAptCreate");
});
this._hoveredCells=_18d;
return true;
},_getParentTable:function(_190){
var _191=_190.parentNode;
while(_191.tagName.toLowerCase()!="table"){
_191=_191.parentNode;
}
return _191;
},_getNextRowCell:function(cell){
var _193=cell.parentNode;
var _194=this._getParentTable(cell);
var _195=_194.rows[_193.rowIndex+1];
var _196=null;
if(_195){
var _197=_195.cells.length;
var _198=_193.cells.length;
if(_197==_198){
_196=_195.cells[cell.cellIndex];
}else{
if(_197<_198){
_196=_195.cells[cell.cellIndex-1];
}else{
_196=_195.cells[cell.cellIndex+1];
}
}
}
return _196;
},_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 _19c=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _19d=(_19c.get_allowEdit()!=null)?_19c.get_allowEdit():this.get_allowEdit();
if(!_19d){
return;
}
var _19e=new Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs(_19c);
this.raise_appointmentResizeStart(_19e);
if(_19e.get_cancel()==false){
this._resizingState.resizing=true;
this._resizingState.resizingAppointment=_19c;
var _19f=$(this._resizingState.resizingElement);
this._resizingState.originalSize={height:_19f.height(),width:_19f.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 _1a1=this._resizingState.resizingElement;
if(!_1a1){
return;
}
var _1a2=_1a1.parentNode.parentNode;
var _1a3=10;
var _1a4=this._getCellFromCoordinates(e.clientX,e.clientY-_1a3);
if(!_1a4){
return;
}
var _1a5=this._activeModel.getTimeSlotFromDomElement(_1a4);
var _1a6=new Telerik.Web.UI.SchedulerAppointmentResizingEventArgs(this._resizingState.resizingAppointment,_1a5);
this.raise_appointmentResizing(_1a6);
if(_1a6.get_cancel()){
return;
}
var _1a7=_1a2.parentNode.parentNode.parentNode;
var _1a8=_1a4.parentNode.parentNode.parentNode;
if(_1a7!=_1a8){
return;
}
this._activeModel.updateResizingAppointmentSize(_1a1,_1a4);
this._keepElementInView(this._resizingState.resizingElement,true);
},_onSelectStart:function(e){
return false;
},_findResizeTargetSlot:function(_1aa){
var _1ab=_1aa.parentNode.parentNode;
var _1ac=_1ab.parentNode;
var _1ad;
if(this.get_selectedView()==Telerik.Web.UI.SchedulerViewType.TimelineView){
var _1ae=_1ab.offsetWidth;
var _1af=Math.ceil(_1aa.offsetWidth/_1ae);
var _1b0=_1ab.cellIndex+_1af-1;
_1b0=Math.min(_1b0,_1ac.cells.length-1);
var _1ad=_1ac.cells[_1b0];
}else{
var _1b1=_1aa.parentNode.parentNode.offsetHeight;
var _1b2=Math.ceil(_1aa.offsetHeight/_1b1);
var _1b3=_1ac.rowIndex+_1b2-1;
_1b3=Math.min(_1b3,_1ac.parentNode.rows.length-1);
var _1b4=_1ac.parentNode.rows[_1b3];
_1ad=_1b4.cells[_1ab.cellIndex];
}
return this._activeModel.getTimeSlotFromDomElement(_1ad);
},_onResizeGripMouseUp:function(e){
if(!this._resizingState.resizingElement){
return;
}
var _1b6=this._findResizeTargetSlot(this._resizingState.resizingElement);
var _1b7=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var _1b8=this._activeModel.getTimeSlotFromDomElement(_1b7.get_element());
var _1b9=_1b6.get_startTime();
Telerik.Web.UI.RadScheduler._incrementTime(_1b9,0,_1b6.get_duration());
if(_1b9.getTime()==_1b7.get_end().getTime()){
this._cleanupResize();
return;
}
var args={OnConfirm:this._onAppointmentResizeCallback,OnCancel:this._onAppointmentResizeAbortCallback,Scheduler:this,Appointment:_1b7,SourceSlotIndex:_1b8.get_index(),TargetSlotIndex:_1b6.get_index(),UpdatedEndDate:_1b9,CallbackIsCalledFromDialog:true};
if(_1b7._recurrenceState==1||_1b7._recurrenceState==2){
var _1bb=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Resize);
this.raise_recurrenceActionDialogShowing(_1bb);
if(_1bb.get_cancel()){
var _1bc=_1bb.get_editSeries();
if(_1bc!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(_1bc,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(_1bd,args){
if(args.CallbackIsCalledFromDialog){
var _1bf=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Resize,_1bd);
args.Scheduler.raise_recurrenceActionDialogClosed(_1bf);
}
var _1c0=new Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs(args.Appointment,args.UpdatedEndDate,_1bd);
args.Scheduler.raise_appointmentResizeEnd(_1c0);
if(_1c0.get_cancel()==false){
var _1c1={Command:"Resize",AppointmentID:args.Appointment._internalID,SourceSlotIndex:args.SourceSlotIndex,TargetSlotIndex:args.TargetSlotIndex,EditSeries:_1bd};
args.Scheduler.postback(_1c1);
}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 _1c5=this.get_element().getElementsByTagName("table");
for(var i=0;i<_1c5.length;i++){
var _1c7=_1c5[i];
if(Sys.UI.DomElement.containsCssClass(_1c7,"rsContentTable")||Sys.UI.DomElement.containsCssClass(_1c7,"rsAllDayTable")||Sys.UI.DomElement.containsCssClass(_1c7,"rsTimelineTable")){
_1c7.targetRect=$telerik.getBounds(_1c7);
var _1c8=this._getTotalOffset(this.get_element());
_1c7.targetRect.x-=_1c8.left;
_1c7.targetRect.y-=_1c8.top;
var _1c9=$(this.get_contentElement()).find("div.rsContentScrollArea")[0];
if(_1c9&&$telerik.isDescendant(_1c9,_1c7)){
this._compensateScrollOffset(_1c9,_1c7);
}
var _1ca=_1c7.rows[0].cells[0];
_1c7.cellWidth=_1c7.targetRect.width/_1c7.rows[0].cells.length;
var _1cb=[];
$.each(_1c7.rows,function(){
Array.add(_1cb,this.cells[0].offsetHeight);
});
_1c7.cellHeights=_1cb;
Array.add(this._modelTables,_1c7);
}
}
return this._modelTables;
},_compensateScrollOffset:function(_1cc,_1cd){
var _1ce=$telerik.getScrollOffset(_1cc,false);
_1cd.targetRect.x+=_1ce.x;
_1cd.targetRect.y+=_1ce.y;
if($telerik.isSafari){
_1cd.targetRect.x+=_1ce.x;
_1cd.targetRect.y+=_1ce.y;
}
},_getTotalOffset:function(_1cf){
var _1d0=_1cf.offsetTop;
var _1d1=_1cf.offsetLeft;
var _1d2=_1cf.offsetParent;
while(_1d2){
_1d0+=_1d2.offsetTop;
_1d1+=_1d2.offsetLeft;
_1d2=_1d2.offsetParent;
}
return {top:_1d0,left:_1d1};
},_getCellFromCoordinates:function(_1d3,_1d4){
if(!this.get_element()){
return;
}
var _1d5=this._modelTables;
var _1d6=$("#"+this.get_element().id+" div.rsContentScrollArea:first")[0];
var _1d7=$telerik.getScrollOffset(_1d6,true);
var _1d8=this._getTotalOffset(this.get_element());
for(var i=0,_1da=_1d5.length;i<_1da;i++){
var x=_1d3+_1d7.x;
var y=_1d4+_1d7.y;
var _1dd=_1d5[i];
var _1de={x:_1dd.targetRect.x+_1d8.left,y:_1dd.targetRect.y+_1d8.top,width:_1dd.targetRect.width,height:_1dd.targetRect.height};
var _1df=_1de.y+_1de.height;
var _1e0=_1de.x+_1de.width;
if(x>=_1de.x&&x<=_1e0&&y>=_1de.y&&y<=_1df){
var _1e1=this._getRowIndex(y,_1dd,_1de.y);
_1e1=Math.min(_1dd.rows.length-1,Math.max(0,_1e1));
var _1e2=parseInt((x-_1de.x)/_1dd.cellWidth);
_1e2=Math.min(_1dd.rows[_1e1].cells.length-1,Math.max(0,_1e2));
return _1dd.rows[_1e1].cells[_1e2];
}
}
return null;
},_getRowIndex:function(_1e3,_1e4,_1e5){
var _1e6=0;
var _1e7=_1e4.cellHeights.length;
var _1e8=_1e5;
while(_1e6<_1e7){
var _1e9=_1e8+_1e4.cellHeights[_1e6];
if(_1e8<=_1e3&&_1e3<_1e9){
break;
}
_1e8=_1e9;
_1e6++;
}
return _1e6;
},_shouldStartDrag:function(_1ea){
if(!this._initialDragAppointment||!this._initialDragMousePos){
return false;
}
if(Math.abs(this._initialDragMousePos.x-_1ea.x)>4||Math.abs(this._initialDragMousePos.y-_1ea.y)>4){
return true;
}
},_onDocumentMouseMove:function(e){
var _1ec=this._getMousePosition(e);
if(!this._dragging&&this._shouldStartDrag(_1ec)){
this._startDrag(e);
}
if(!this._dragging||!this._draggingAppointment){
return;
}
Telerik.Web.UI.RadScheduler._clearSelection();
var _1ed=this._draggingAppointment.get_element();
var _1ee=this._getCellFromCoordinates(e.clientX,e.clientY-this._draggingOffset);
if(!_1ee||!_1ee.tagName||_1ee.tagName.toLowerCase()!="td"||_1ee.firstChild==_1ed.parentNode){
return;
}
$(_1ed.parentNode).removeClass(this._styles.dragTarget);
var _1ef=$(_1ee).find("div.rsWrap:first");
if(_1ef.length==0){
var cell=$(_1ee);
_1ef=$(_1ed.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"});
_1ef.appendTo(cell);
}
if(this.get_selectedView()!=Telerik.Web.UI.SchedulerViewType.MonthView){
_1ef.append(_1ed);
}else{
if(_1ee.childNodes[1]){
_1ee.childNodes[1].appendChild(_1ed);
}
}
$(_1ed.parentNode).addClass(this._styles.dragTarget).css("display","");
var _1f1=this._activeModel.getTimeSlotFromDomElement(_1ee);
var args=new Telerik.Web.UI.SchedulerAppointmentMovingEventArgs(this._draggingAppointment,_1f1);
this.raiseEvent("appointmentMoving",args);
if(args.get_cancel()){
this._abortDrag(e);
}else{
this._keepElementInView(_1ed);
}
return true;
},_keepElementInView:function(_1f3,_1f4){
this._keepElementInViewHorizontal(_1f3,_1f4);
this._keepElementInViewVertical(_1f3,_1f4);
},_keepElementInViewHorizontal:function(_1f5,_1f6){
var _1f7=$("#"+this.get_element().id+" div.rsContentScrollArea")[0];
var _1f8=$("#"+this.get_element().id+" div.rsContent")[0];
var _1f9=this._getRelativeOffset(_1f7,_1f8);
var _1fa=this._getRelativeOffset(_1f5,_1f8);
_1fa.left-=_1f9.left;
_1fa.top-=_1f9.top;
var _1fb=_1f5.parentNode.parentNode.offsetWidth;
var _1fc=_1fa.left;
var _1fd=_1f5.offsetWidth;
var _1fe=_1fc+_1fd;
var _1ff=_1f7.clientWidth+_1f7.scrollLeft;
if(!_1f6&&_1fc<_1f7.scrollLeft){
_1f7.scrollLeft=_1fc;
}
if(_1fe>_1ff){
var _200=_1f7.scrollLeft+(_1fe-_1ff);
if((_1f7.clientWidth+_200)>_1f7.scrollWidth){
return;
}
if(!_1f6&&_200>_1fc){
_200=_1fc;
}
_1f7.scrollLeft=_200;
}
if(_1f6&&(_1fe-_1fb)<_1f7.scrollLeft){
_1f7.scrollLeft=_1fe-_1fb;
}
},_keepElementInViewVertical:function(_201,_202){
var _203=$("#"+this.get_element().id+" div.rsContentScrollArea")[0];
var _204=$("#"+this.get_element().id+" div.rsContent")[0];
var _205=this._getRelativeOffset(_203,_204);
var _206=this._getRelativeOffset(_201,_204);
_206.left-=_205.left;
_206.top-=_205.top;
var _207=_201.parentNode.parentNode.offsetHeight;
var _208=_206.top;
var _209=_201.offsetHeight;
var _20a=_208+_209;
var _20b=_203.clientHeight+_203.scrollTop;
if(!_202&&_208<_203.scrollTop){
_203.scrollTop=_208;
}
if(_20a>_20b){
var _20c=_203.scrollTop+(_20a-_20b);
if((_203.clientHeight+_20c)>_203.scrollHeight){
return;
}
if(!_202&&_20c>_208){
_20c=_208;
}
_203.scrollTop=_20c;
}
if(_202&&(_20a-_207)<_203.scrollTop){
_203.scrollTop=_20a-_207;
}
},_getRelativeOffset:function(_20d,_20e){
var _20f=_20d.offsetParent;
var _210=_20d.offsetTop;
var _211=_20d.offsetLeft;
while(_20f!=_20e){
_210+=_20f.offsetTop;
_211+=_20f.offsetLeft;
if(!_20f.offsetParent){
break;
}
_20f=_20f.offsetParent;
}
return {top:_210,left:_211};
},_getMousePosition:function(e){
var _213=$telerik.getScrollOffset(document.body,true);
var _214=e.clientX;
var _215=e.clientY;
_214+=_213.x;
_215+=_213.y;
return {x:_214,y:_215};
},_onAppointmentMouseDown:function(e){
if(this.get_readOnly()){
return;
}
var _217=this.getAppointmentFromDomElement(e.eventMapTarget);
var _218=(_217.get_allowEdit()!=null)?_217.get_allowEdit():this.get_allowEdit();
if(!_218){
return;
}
this._initialDragMousePos=this._getMousePosition(e);
this._initialDragAppointment=_217;
$addHandler(document,"selectstart",this._onSelectStartDelegate);
$addHandler(document,"mouseup",this._onDocMouseUpDelegate);
$addHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=true;
},_startDrag:function(e){
var _21a=this._initialDragAppointment;
var _21b=this._getCellFromCoordinates(e.clientX,e.clientY);
if(!_21b){
return;
}
var _21c=new Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs(_21a);
this.raiseEvent("appointmentMoveStart",_21c);
if(_21c.get_cancel()){
return;
}
this._draggingAppointment=_21a;
this._dragging=true;
var _21d=this._draggingAppointment.get_element();
var _21e=$telerik.getLocation(_21d);
if($telerik.isFirefox||$telerik.isSafari){
var _21f=$telerik.getScrollOffset(_21d,true);
_21e.x-=_21f.x;
_21e.y-=_21f.y;
if($telerik.isFirefox){
_21e.x+=document.body.parentNode.scrollLeft;
_21e.y+=document.body.parentNode.scrollTop;
}else{
_21e.x+=document.body.scrollLeft;
_21e.y+=document.body.scrollTop;
}
}
var _220=$telerik.getLocation(_21b);
var _221=e.clientY-_21e.y;
var _222=e.clientY-_220.y;
this._draggingOffset=_221-_222;
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;
}
_21a._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,_227){
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 _228=this._draggingAppointment.get_element();
if(!_227&&_228.parentNode&&_228.parentNode.parentNode){
var _229=_228.parentNode.parentNode;
this._draggingAppointment._endDrag(_229);
}else{
this._draggingAppointment._abortDrag();
}
this._draggingAppointment=null;
this._dragging=false;
Sys.UI.DomElement.removeCssClass(_228.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 _22b=this.getAppointmentFromDomElement(e.eventMapTarget);
var _22c=new Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs(_22b);
this.raise_appointmentDoubleClick(_22c);
this._editAppointmentInline(_22b);
e.stopPropagation();
},_editAppointmentInline:function(_22d){
if(this.get_readOnly()){
return;
}
if(_22d){
var _22e=(_22d.get_allowEdit()!=null)?_22d.get_allowEdit():this.get_allowEdit();
if(!_22e){
return;
}
var args={OnConfirm:this._onAppointmentEditCallback,Scheduler:this,Appointment:_22d,CallbackIsCalledFromDialog:true};
if(_22d._recurrenceState==1||_22d._recurrenceState==2||_22d._recurrenceState==3){
var _230=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Edit);
this.raise_recurrenceActionDialogShowing(_230);
if(_230.get_cancel()){
var _231=_230.get_editSeries();
if(_231!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(_231,args);
}
}else{
Telerik.Web.UI.RecurrenceActionDialog.Show(Telerik.Web.UI.RecurrenceAction.Edit,args);
}
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentEditCallback(false,args);
}
}
},_onAppointmentEditCallback:function(_232,args){
if(args.CallbackIsCalledFromDialog){
var _234=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Edit,_232);
args.Scheduler.raise_recurrenceActionDialogClosed(_234);
}
var _235=new Telerik.Web.UI.SchedulerAppointmentEditingEventArgs(args.Appointment,_232);
args.Scheduler.raise_appointmentEditing(_235);
if(_235.get_cancel()==false){
args.Scheduler.editAppointment(args.Appointment,_232);
}
},_onShowMoreClick:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.eventMapTarget);
var _238={Command:"SwitchToSelectedDay",SourceSlotIndex:slot.get_index()};
this.postback(_238);
},_onAppointmentMouseOver:function(e){
if(this._resizingState.resizing||this._dragging){
e.stopPropagation();
return;
}
var _23a=this.getAppointmentDomElement(e.eventMapTarget);
var _23b=this.getAppointmentFromDomElement(_23a);
var _23c=(_23b.get_allowDelete()!=null)?_23b.get_allowDelete():this.get_allowDelete();
if(!_23c){
return;
}
this._hoveredAppointmentElement=_23a;
var _23d=$telerik.getElementByClassName(_23a,"rsAptDelete","a");
if(_23d){
_23d.style.visibility="visible";
}
},_onAppointmentMouseOut:function(e){
var _23f=e.rawEvent.relatedTarget?e.rawEvent.relatedTarget:e.rawEvent.toElement;
if(!_23f||$telerik.isDescendant(this._hoveredAppointmentElement,_23f)){
return;
}else{
var _240=this.getAppointmentDomElement(e.eventMapTarget);
var _241=$telerik.getElementByClassName(_240,"rsAptDelete","a");
if(_241){
_241.style.visibility="hidden";
}
}
},_onCellClick:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.target);
if(!slot){
return;
}
var _244=new Telerik.Web.UI.SchedulerTimeSlotClickEventArgs(slot.get_startTime(),slot,e);
this.raise_timeSlotClick(_244);
},_onCellContextMenu:function(e){
var slot=this._activeModel.getTimeSlotFromDomElement(e.target);
if(!slot){
return;
}
var _247=new Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs(slot.get_startTime(),slot.get_isAllDay(),e,slot);
this.raise_timeSlotContextMenu(_247);
},_onCellDoubleClick:function(e){
if(!this.get_readOnly()&&this.get_allowInsert()){
var slot=this._activeModel.getTimeSlotFromDomElement(e.target);
var _24a=new Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs(slot.get_startTime(),slot.get_isAllDay(),slot);
this.raise_appointmentInserting(_24a);
if(_24a.get_cancel()==false){
this.showInsertFormAt(slot);
}
}
return false;
},_onAppointmentDeleteClick:function(e){
if(!this.get_readOnly()){
var _24c=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_24c){
var args={OnConfirm:this._onAppointmentDeleteCallback,Scheduler:this,Appointment:_24c,CallbackIsCalledFromDialog:true};
if(_24c._recurrenceState==1||_24c._recurrenceState==2||_24c._recurrenceState==3){
var _24e=new Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Delete);
this.raise_recurrenceActionDialogShowing(_24e);
if(_24e.get_cancel()){
var _24f=_24e.get_editSeries();
if(_24f!==null){
args.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(_24f,args);
}
}else{
Telerik.Web.UI.RecurrenceActionDialog.Show(Telerik.Web.UI.RecurrenceAction.Delete,args);
}
}else{
if(this.get_displayDeleteConfirmation()){
var _250=this.get_localization();
var _251=$telerik.$.modal("#"+this.get_element().id+">.rsTopWrap");
_251.initialize().set_content({title:_250.ConfirmDeleteTitle,content:_250.ConfirmDeleteText,ok:_250.ConfirmOK,cancel:_250.ConfirmCancel}).set_onActionConfirm(function(_252){
args.OnConfirm(false,args);
}).show();
}else{
args.CallbackIsCalledFromDialog=false;
this._onAppointmentDeleteCallback(false,args);
}
}
}
}
e.stopPropagation();
e.preventDefault();
},_onAppointmentDeleteCallback:function(_253,args){
if(args.CallbackIsCalledFromDialog){
var _255=new Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs(args.Appointment,Telerik.Web.UI.RecurrenceAction.Delete,_253);
args.Scheduler.raise_recurrenceActionDialogClosed(_255);
}
var _256=new Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs(args.Appointment,_253);
args.Scheduler.raise_appointmentDeleting(_256);
if(_256.get_cancel()==false){
var _257={Command:"Delete",AppointmentID:args.Appointment._internalID,EditSeries:_253};
args.Scheduler.postback(_257);
}
},_onPreviousDayClick:function(e){
var _259=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_259){
var _25a={Command:"GoToPrevious",AppointmentID:_259._internalID};
this.postback(_25a);
}
e.stopPropagation();
e.preventDefault();
},_onNextDayClick:function(e){
var _25c=this.getAppointmentFromDomElement(e.eventMapTarget);
if(_25c){
var _25d={Command:"GoToNext",AppointmentID:_25c._internalID};
this.postback(_25d);
}
e.stopPropagation();
e.preventDefault();
},_onDayViewTabClick:function(e){
var _25f={Command:"SwitchToDayView"};
this.postback(_25f);
e.stopPropagation();
e.preventDefault();
},_onWeekViewTabClick:function(e){
var _261={Command:"SwitchToWeekView"};
this.postback(_261);
e.stopPropagation();
e.preventDefault();
},_onMonthViewTabClick:function(e){
var _263={Command:"SwitchToMonthView"};
this.postback(_263);
e.stopPropagation();
e.preventDefault();
},_onTimelineViewTabClick:function(e){
var _265={Command:"SwitchToTimelineView"};
this.postback(_265);
e.stopPropagation();
e.preventDefault();
},_onMultiDayViewTabClick:function(e){
var _267={Command:"SwitchToMultiDayView"};
this.postback(_267);
e.stopPropagation();
e.preventDefault();
},_onPreviousSchedulerDayClick:function(e){
var _269={Command:"NavigateToPreviousPeriod"};
this.postback(_269);
e.stopPropagation();
e.preventDefault();
},_onNextSchedulerDayClick:function(e){
var _26b={Command:"NavigateToNextPeriod"};
this.postback(_26b);
e.stopPropagation();
e.preventDefault();
},_onTodayClick:function(e){
var _26d={Command:"GoToToday"};
this.postback(_26d);
e.stopPropagation();
e.preventDefault();
},_onFullTimeLinkClick:function(e){
var _26f={Command:"SwitchFullTime"};
this.postback(_26f);
e.stopPropagation();
e.preventDefault();
},postback:function(args){
this._onContentScroll();
var _271=$telerik.getElementByClassName(this.get_element(),"rsContent","div");
var _272=this.get_postBackReference().replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(args));
eval(_272);
},_getElementIndex:function(_273,_274){
if(!_273){
return;
}
for(var i=0;i<_273.length;i++){
if(_273[i]===_274){
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 _276=$("#"+this.get_element().id+" .rsAptEditSizingWrapper");
if(_276.length){
this._inlineTemplate.attachTo(_276[0]);
}
}
var _277=Function.createDelegate(this,this._inlineFormSaveClicked);
this._inlineTemplate.add_saveClicked(_277);
var _278=Function.createDelegate(this,this._inlineFormMoreClicked);
this._inlineTemplate.add_moreClicked(_278);
}
return this._inlineTemplate;
},_inlineFormSaveClicked:function(_279,_27a){
var apt=this._extractAppointmentFromInlineTemplate(_279);
if(_279.get_isInsert()){
this.insertAppointment(apt);
}else{
apt._internalID=_279.get_appointmentInternalID();
this.updateAppointment(apt,_279.get_editSeries());
}
},_inlineFormMoreClicked:function(_27c,_27d){
var apt=this._extractAppointmentFromInlineTemplate(_27c);
if(_27c.get_isInsert()){
this._showAdvancedInsertForm(apt);
}else{
apt._internalID=_27c.get_appointmentInternalID();
this._showAdvancedEditForm(apt,_27c.get_editSeries());
}
},_extractAppointmentFromInlineTemplate:function(_27f){
var _280=_27f.get_element();
if(_280.originalParent){
_280=_280.originalParent;
}
var _281=_27f.get_start();
var _282=_27f.get_end();
var _283;
if(!_281&&!_282){
var _284=this._activeModel.getTimeSlotFromDomElement(_280);
if(!_284.get_isAllDay()){
_281=_284.get_startTime();
_282=new Date(_281.getTime());
Telerik.Web.UI.RadScheduler._incrementTime(_282,0,this.get_minutesPerRow()*this.get_numberOfHoveredRows());
}else{
_281=new Date(_284.get_startTime());
_281.setHours(0,0,0,0);
_282=new Date(_281.getTime());
Telerik.Web.UI.RadScheduler._incrementTime(_282,24);
}
if(_284.get_resource){
_283=_284.get_resource();
}
}
var apt=new Telerik.Web.UI.SchedulerAppointment();
apt.set_subject(_27f.get_text());
apt.set_start(_281);
apt.set_end(_282);
if(_283){
apt.get_resources().add(_283);
}
return apt;
},_showAdvancedInsertForm:function(_286){
var _287={command:"AdvancedInsert",appointment:this._getSerializableAppointment(_286),startDate:_286.get_start().format("yyyyMMddHHmm"),endDate:_286.get_end().format("yyyyMMddHHmm")};
this.postback(_287);
},_showAdvancedEditForm:function(_288,_289){
var _28a={command:"AdvancedEdit",appointmentID:_288._internalID,appointment:this._getSerializableAppointment(_288),startDate:_288.get_start().format("yyyyMMddHHmm"),endDate:_288.get_end().format("yyyyMMddHHmm"),editSeries:_289};
this.postback(_28a);
},add_appointmentClick:function(_28b){
this.get_events().addHandler("AppointmentClick",_28b);
},remove_appointmentClick:function(_28c){
this.get_events().removeHandler("AppointmentClick",_28c);
},raise_appointmentClick:function(args){
this.raiseEvent("AppointmentClick",args);
},add_appointmentInserting:function(_28e){
this.get_events().addHandler("AppointmentInserting",_28e);
},remove_appointmentInserting:function(_28f){
this.get_events().removeHandler("AppointmentInserting",_28f);
},raise_appointmentInserting:function(_290){
this.raiseEvent("AppointmentInserting",_290);
},add_appointmentDoubleClick:function(_291){
this.get_events().addHandler("AppointmentDoubleClick",_291);
},remove_appointmentDoubleClick:function(_292){
this.get_events().removeHandler("AppointmentDoubleClick",_292);
},raise_appointmentDoubleClick:function(_293){
this.raiseEvent("AppointmentDoubleClick",_293);
},add_appointmentResizeStart:function(_294){
this.get_events().addHandler("AppointmentResizeStart",_294);
},remove_appointmentResizeStart:function(_295){
this.get_events().removeHandler("AppointmentResizeStart",_295);
},raise_appointmentResizeStart:function(args){
this.raiseEvent("AppointmentResizeStart",args);
},add_appointmentResizeEnd:function(_297){
this.get_events().addHandler("AppointmentResizeEnd",_297);
},remove_appointmentResizeEnd:function(_298){
this.get_events().removeHandler("AppointmentResizeEnd",_298);
},raise_appointmentResizeEnd:function(args){
this.raiseEvent("AppointmentResizeEnd",args);
},add_appointmentResizing:function(_29a){
this.get_events().addHandler("AppointmentResizing",_29a);
},remove_appointmentResizing:function(_29b){
this.get_events().removeHandler("AppointmentResizing",_29b);
},raise_appointmentResizing:function(args){
this.raiseEvent("AppointmentResizing",args);
},add_appointmentDeleting:function(_29d){
this.get_events().addHandler("AppointmentDeleting",_29d);
},remove_appointmentDeleting:function(_29e){
this.get_events().removeHandler("AppointmentDeleting",_29e);
},raise_appointmentDeleting:function(args){
this.raiseEvent("AppointmentDeleting",args);
},add_timeSlotClick:function(_2a0){
this.get_events().addHandler("TimeSlotClick",_2a0);
},remove_timeSlotClick:function(_2a1){
this.get_events().removeHandler("TimeSlotClick",_2a1);
},raise_timeSlotClick:function(args){
this.raiseEvent("TimeSlotClick",args);
},add_appointmentEditing:function(_2a3){
this.get_events().addHandler("AppointmentEditing",_2a3);
},remove_appointmentEditing:function(_2a4){
this.get_events().removeHandler("AppointmentEditing",_2a4);
},raise_appointmentEditing:function(args){
this.raiseEvent("AppointmentEditing",args);
},add_appointmentMoveStart:function(_2a6){
this.get_events().addHandler("appointmentMoveStart",_2a6);
},remove_appointmentMoveStart:function(_2a7){
this.get_events().removeHandler("appointmentMoveStart",_2a7);
},add_appointmentMoving:function(_2a8){
this.get_events().addHandler("appointmentMoving",_2a8);
},remove_appointmentMoving:function(_2a9){
this.get_events().removeHandler("appointmentMoving",_2a9);
},add_appointmentMoveEnd:function(_2aa){
this.get_events().addHandler("appointmentMoveEnd",_2aa);
},remove_appointmentMoveEnd:function(_2ab){
this.get_events().removeHandler("appointmentMoveEnd",_2ab);
},add_recurrenceActionDialogShowing:function(_2ac){
this.get_events().addHandler("RecurrenceActionDialogShowing",_2ac);
},remove_recurrenceActionDialogShowing:function(_2ad){
this.get_events().removeHandler("RecurrenceActionDialogShowing",_2ad);
},raise_recurrenceActionDialogShowing:function(args){
this.raiseEvent("RecurrenceActionDialogShowing",args);
},add_recurrenceActionDialogClosed:function(_2af){
this.get_events().addHandler("RecurrenceActionDialogClosed",_2af);
},remove_recurrenceActionDialogClosed:function(_2b0){
this.get_events().removeHandler("RecurrenceActionDialogClosed",_2b0);
},raise_recurrenceActionDialogClosed:function(args){
this.raiseEvent("RecurrenceActionDialogClosed",args);
},add_formCreated:function(_2b2){
this.get_events().addHandler("FormCreated",_2b2);
},remove_formCreated:function(_2b3){
this.get_events().removeHandler("FormCreated",_2b3);
},raise_formCreated:function(args){
this.raiseEvent("FormCreated",args);
},add_appointmentContextMenu:function(_2b5){
this.get_events().addHandler("AppointmentContextMenu",_2b5);
},remove_appointmentContextMenu:function(_2b6){
this.get_events().removeHandler("AppointmentContextMenu",_2b6);
},raise_appointmentContextMenu:function(args){
this.raiseEvent("AppointmentContextMenu",args);
},add_timeSlotContextMenu:function(_2b8){
this.get_events().addHandler("TimeSlotContextMenu",_2b8);
},remove_timeSlotContextMenu:function(_2b9){
this.get_events().removeHandler("TimeSlotContextMenu",_2b9);
},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(_2bc,args){
var _2be=args.Scheduler.get_localization();
var _2bf="";
var _2c0="";
var _2c1="";
switch(_2bc){
case Telerik.Web.UI.RecurrenceAction.Delete:
_2bf=_2be.ConfirmRecurrenceDeleteOccurrence;
_2c0=_2be.ConfirmRecurrenceDeleteSeries;
_2c1=_2be.ConfirmRecurrenceDeleteTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Edit:
_2bf=_2be.ConfirmRecurrenceEditOccurrence;
_2c0=_2be.ConfirmRecurrenceEditSeries;
_2c1=_2be.ConfirmRecurrenceEditTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Resize:
_2bf=_2be.ConfirmRecurrenceResizeOccurrence;
_2c0=_2be.ConfirmRecurrenceResizeSeries;
_2c1=_2be.ConfirmRecurrenceResizeTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Move:
_2bf=_2be.ConfirmRecurrenceMoveOccurrence;
_2c0=_2be.ConfirmRecurrenceMoveSeries;
_2c1=_2be.ConfirmRecurrenceMoveTitle;
break;
}
var _2c2=$.modal("#"+args.Scheduler.get_element().id+">.rsTopWrap");
var _2c3=["<label><input type=\"radio\" id=\"choiceOccurrenceSpan_0\" name=\"choiceOccurrenceSpan\" value=\"occurrence\" checked=\"checked\" />",_2bf,"</label>","<label><input type=\"radio\" id=\"choiceOccurrenceSpan_1\" name=\"choiceOccurrenceSpan\" value=\"series\" />",_2c0,"</label>"];
_2c2.initialize().set_content({title:_2c1,content:_2c3.join(""),ok:_2be.ConfirmOK,cancel:_2be.ConfirmCancel}).set_onActionConfirm(function(e,_2c5){
var _2c6=$(_2c5).find("input[name=choiceOccurrenceSpan]:checked").val()=="series";
args.OnConfirm(_2c6,args);
_2c2.dispose();
}).set_onActionCancel(function(){
if(args.OnCancel){
args.OnCancel(args);
}
_2c2.dispose();
}).show();
};
})($telerik.$);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerResource=function(_2c7){
this._key=_2c7.key;
this._type=_2c7.type;
this._text=_2c7.text;
this._internalKey=_2c7.internalKey;
this._available=_2c7.available;
this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection(this);
if(typeof (_2c7.attributes)!="undefined"){
this._attributes._load(_2c7.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 _2c9=this._array.length;
this.insert(_2c9,item);
},insert:function(_2ca,item){
Array.insert(this._array,_2ca,item);
},remove:function(item){
Array.remove(this._array,item);
},removeAt:function(_2cd){
var item=this.getAppointment(_2cd);
if(item){
this.remove(item);
}
},clear:function(){
this._array=new Array();
},get_count:function(){
return this._array.length;
},forEach:function(_2cf){
for(var i=0,_2d1=this.get_count();i<_2d1;i++){
_2cf(this.getResource(i));
}
},getResource:function(_2d2){
return this._array[_2d2];
},getResourcesByType:function(type){
var _2d4=new Telerik.Web.UI.SchedulerResourceCollection();
this.forEach(function(_2d5){
if(_2d5.get_type()==type){
_2d4.add(_2d5);
}
});
return _2d4;
}};
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,_2d8){
this._add(key,_2d8);
var _2d9={};
_2d9[key]=_2d8;
},_add:function(key,_2db){
if(Array.indexOf(this._keys,key)<0){
Array.add(this._keys,key);
}
this._data[key]=_2db;
},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(_2df){
throw Error.notImplemented();
},updateResizingAppointmentSize:function(_2e0,_2e1){
}};
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");


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();