Type.registerNamespace("Telerik.Web.UI"); (function(a,b,g){var f=60000; var e=f*60; var d=e*24; b.RecurrenceState=function(){}; b.RecurrenceState.prototype={NotRecurring:0,Master:1,Occurrence:2,Exception:3}; b.RecurrenceState.registerEnum("Telerik.Web.UI.RecurrenceState"); b.SchedulerAppointment=function(l,k){this._attributes=new b.SchedulerAttributeCollection(this); this._visible=true; this._domElement=null; this._domElements=[]; this._recurrenceState=b.RecurrenceState.NotRecurring; this._recurrenceRule=""; this._backColor=null; this._borderStyle="solid"; this._borderColor=null; this._borderWidth=null; this._selected=false; if(!l){return; }this._serverData=l; this._id=l.id; this._subject=l.subject; this._description=l.description; this._start=new Date(Date.parse(l.start)); this._end=new Date(Date.parse(l.end)); this._toolTip=l.toolTip; this._internalID=l.internalID; this._visible=l.visible; this._recurrenceState=l.recurrenceState; this._recurrenceParentID=l.recurrenceParentID; this._contextMenuID=l.contextMenuID; this._serializedResources=l.resources; this._resources=null; this._timeZoneID=(l.timeZoneID||k._timeZoneId); if(l.domElements){for(var h=0,j=l.domElements.length; h0){this._domElement=this._domElements[0]; }return this._domElement; },get_elements:function(){return this._domElements; },get_timeSlot:function(){var h=this.get_owner(); if(!h){return null; }return h.get_activeModel().getTimeSlotForAppointment(this); },get_attributes:function(){return this._attributes; },get_recurrenceState:function(){return this._recurrenceState; },set_recurrenceState:function(h){this._recurrenceState=h; },get_recurrenceRule:function(){return this._recurrenceRule; },set_recurrenceRule:function(h){this._recurrenceRule=h; },get_recurrenceParentID:function(){return this._recurrenceParentID; },get_resources:function(){if(!this._resources){this._resources=new b.SchedulerResourceCollection(); for(var j in this._serializedResources){var i=this._serializedResources[j]; if(i.text){this._resources.add(new b.SchedulerResource(i)); }else{var k=this.get_owner().get_resources().getResourcesByType(i.type); var h=this._resources; k.forEach(function(l){if(l.get_key()==i.key){h.add(l); }}); }}}return this._resources; },edit:function(){var h=this.get_owner(); if(h){h.editAppointment(this); }},remove:function(){var h=this.get_owner(); if(h){h.deleteAppointment(this); }},compare:function(h){if(this.get_start().getTime()h.get_start().getTime()){return 1; }if(this.get_end().getTime()>h.get_end().getTime()){return -1; }return 0; },_isAllDay:function(){return this.get_duration()%d==0; },_isInRange:function(l,j){var i=this.get_start(); var h=this.get_end(); var k=il; if(this.get_duration()==0){return k||i.getTime()==l.getTime(); }return k; },_startsInRange:function(j,i){var h=this.get_start(); return(hj); },_rangeIsInsideAppointment:function(i,h){return this.get_start()<=i&&this.get_end()>=h; },_getTimeSlot:function(){if(!this._timeSlot){if(!this.get_owner()){return null; }this._timeSlot=this.get_owner().get_activeModel().getTimeSlotForAppointment(this); }return this._timeSlot; },_getColumn:function(){return this._column; },_setColumn:function(h){this._column=h; },_setRowIndex:function(h){this._rowIndex=h; },_getRowIndex:function(){return this._rowIndex; },_startDrag:function(k){var l=this.get_owner(),j=l._initialDragAppointmentElement,m=l.get_element(),h=a(k); a(j).css("opacity",0.6); if($telerik.isIE&&l.get_renderMode()!==b.RenderMode.Lite){a(j).css("padding-bottom","4px"); }m.style.cursor="move"; j.style.zIndex=999; this._originalParent=j.parentNode; if(l.get_selectedView()==b.SchedulerViewType.TimelineView){var i=Math.floor(parseInt(j.style.left,10)/100); while(i--){h=h.next(); }this._removeTimelineSlotsOffset(j); }Sys.UI.DomElement.removeCssClass(j,"rsWAppointmentDelete"); },_removeTimelineSlotsOffset:function(h){var i=h.style,j=i.left,k; this._originalLeftOffset=i.left; this._originalLeftMargin=i.marginLeft; if(j){k=parseFloat(j,10)%100; i.left=k+"%"; }i.marginLeft=""; },_resetDragStyles:function(i){var j=this.get_owner(); var h=j._initialDragAppointmentElement; a(h).css("opacity",""); if($telerik.isIE&&j.get_renderMode()!==b.RenderMode.Lite){a(h).css("padding-bottom","0px"); }if(i&&j.get_selectedView()==b.SchedulerViewType.TimelineView){h.style.left=this._originalLeftOffset; h.style.marginLeft=this._originalLeftMargin; }h.style.zIndex=""; var k=j.get_element(); if(k&&k.style){k.style.cursor=""; }},_abortDrag:function(){this._resetDragStyles(true); var h=this.get_owner()._initialDragAppointmentElement; if(h.parentNode!=this._originalParent){this._originalParent.appendChild(h); }},_raiseMoveEnd:function(h){var k=this.get_owner(),j=k._activeModel.getTimeSlotFromDomElement(k._initialDragCell),i={appointment:this,newStartTime:this.get_start(),editingRecurringSeries:false,targetSlot:j,isAbortedByUser:h||false}; a.raiseCancellableControlEvent(k,"appointmentMoveEnd",i); },_finishDrag:function(){var k=this.get_owner(),i=k._activeModel,l=i.getTimeSlotFromDomElement(k._initialDragCell),m=i.getTimeSlotFromDomElement(k._draggingHoveredCell),j=i.get_startOfMovedAppointment(this,m,l); this._resetDragStyles(false); if((l.get_index()==m.get_index())){this._abortDrag(); this._raiseMoveEnd(); return; }var h={OnConfirm:this._onAppointmentMoveCallback,OnCancel:this._onAppointmentMoveAbortCallback,Scheduler:k,Appointment:this,SourceSlot:l,TargetSlot:m,NewStart:j,CallbackIsCalledFromDialog:true}; if(k.get_displayRecurrenceActionDialogOnMove()&&(this._recurrenceState==1||this._recurrenceState==2)){this._showRecurrenceActionDialog(h); }else{h.CallbackIsCalledFromDialog=false; this._onAppointmentMoveCallback(false,h); }},_showRecurrenceActionDialog:function(h){var j=this.get_owner(); var k=new b.SchedulerRecurrenceActionDialogShowingEventArgs(h.Appointment,b.RecurrenceAction.Move); j._raiseRecurrenceActionDialogShowing(k); if(k.get_cancel()){var i=k.get_editSeries(); if(i!==null){h.CallbackIsCalledFromDialog=false; this._onAppointmentMoveCallback(i,h); }else{this._onAppointmentMoveAbortCallback(h); }}else{b.RecurrenceActionDialog.Show(b.RecurrenceAction.Move,h); }},_onAppointmentMoveCallback:function(j,h){h.Scheduler._raiseRecurrenceActionDialogClosedEvent(h,j,b.RecurrenceAction.Move); var k={appointment:h.Appointment,newStartTime:h.NewStart,editingRecurringSeries:j,targetSlot:h.TargetSlot,isAbortedByUser:false}; var i=a.raiseCancellableControlEvent(h.Scheduler,"appointmentMoveEnd",k); if(this._owner&&this.get_owner()._webServiceSettings.get_isEmpty()&&(this.get_owner().get_activeModel()._groupingResource!==g)&&h.Appointment.get_resources().indexOf(h.SourceSlot.get_resource())==-1){i=true; }if(!i){h.Scheduler.moveAppointment(h.Appointment,j,h.SourceSlot,h.TargetSlot); }else{h.Appointment._abortDrag(); }},_onAppointmentMoveAbortCallback:function(h){h.Scheduler._raiseRecurrenceActionDialogClosedEvent(h,false,b.RecurrenceAction.Move); h.Appointment._abortDrag(); h.Appointment._raiseMoveEnd(true); },get_contextMenuID:function(){return this._contextMenuID; },set_contextMenuID:function(h){this._contextMenuID=h; this._contextMenu=null; },clone:function(){var h=new b.SchedulerAppointment(); h._id=this._id; h._subject=this._subject; h._description=this._description; h._start=this._start; h._end=this._end; h._toolTip=this._toolTip; h._internalID=this._internalID; h._visible=this._visible; h._recurrenceState=this._recurrenceState; h._recurrenceParentID=this._recurrenceParentID; h._contextMenuID=this._contextMenuID; h._resources=this.get_resources().clone(); h._attributes=this.get_attributes().clone(); if(this.get_reminders){h._reminders=this.get_reminders().clone(); }for(var i in this){if(h[i]===g&&!i.startsWith("_")){h[i]=c(this[i]); }}return h; },_getStyleMode:function(){var h=this.get_owner(); if(!h){return b.AppointmentStyleMode.Auto; }return h.get_appointmentStyleMode(); },_renderBorder:function(){var h=this.get_borderColor(); var j=this.get_borderWidth()||""; var i=this.get_borderStyle(); var k=this.get_element(); if(!k){return; }if(this._owner&&this._owner.get_renderMode()===b.RenderMode.Lite){a(".rsAptContent",k).css({"border-color":h,"border-style":i,"border-width":j}); }else{if(this._getStyleMode()==b.AppointmentStyleMode.Default){a(".rsAptMid, .rsAptContent, .rsAptIn",k).css({"border-color":h,"border-style":i,"border-width":j}); }else{a(k).addClass("rsAptSimple").css({"border-top-color":h,"border-top-style":i,"border-top-width":j,"border-bottom-color":h,"border-bottom-style":i,"border-bottom-width":j}).find(".rsAptOut").css({"border-left-color":h,"border-left-style":i,"border-left-width":j,"border-right-color":h,"border-right-style":i,"border-right-width":j}); }}}}; function c(j){var h=j,i; if(j&&typeof j==="object"){h=Object.prototype.toString.call(j)==="[object Array]"?[]:{}; for(i in j){h[i]=c(j[i]); }}return h; }b.SchedulerAppointment.registerClass("Telerik.Web.UI.SchedulerAppointment"); })($telerik.$,Telerik.Web.UI); Type.registerNamespace("Telerik.Web.UI"); Telerik.Web.UI.SchedulerAppointmentCollection=function(a){this._array=[]; this._scheduler=a; }; Telerik.Web.UI.SchedulerAppointmentCollection.prototype={add:function(b){var a=this._array.length; this.insert(a,b); },insert:function(a,b){Array.insert(this._array,a,b); this._notify(function(c){c._onAppointmentInserting(b); }); },remove:function(b,a){if(typeof(a)=="undefined"){a=true; }var c=Array.remove(this._array,b); this._notify(function(d){d._onAppointmentRemove(b,a); }); return c; },removeAt:function(b,a){var c=this.getAppointment(b); if(c){this.remove(c,a); }},_clear:function(){this._notify(function(a){a._onAppointmentsClear(); }); this._array=[]; },get_count:function(){return this._array.length; },getAppointment:function(a){return this._array[a]; },indexOf:function(a){return Array.indexOf(this._array,a); },forEach:function(c){for(var b=0,a=this.get_count(); bb; }); },getAppointmentsStartingInRange:function(b,a){return this.findAll(function(c){var d=c.get_start(); return d>=b&&d0; }var e=false; d.forEach(function(f){if(f.get_key()===a.get_key()){e=true; }}); return e; }); },_notify:function(a){if(this._scheduler){a(this._scheduler); }}}; Telerik.Web.UI.SchedulerAppointmentCollection.registerClass("Telerik.Web.UI.SchedulerAppointmentCollection"); (function(a){Type.registerNamespace("Telerik.Web.UI"); var b=Telerik.Web.UI; b.AppointmentsTooltip=function(c){a.observable(this); this._container=c; this._isVisible=false; this._element=null; this._scrollTimer=null; this._anchor=null; }; b.AppointmentsTooltip.prototype={dispose:function(){this.hide(); this._container=null; this.disposeObservable(); },show:function(){this._element=a("
").appendTo(this._container); this._bindEvents(); return this; },hide:function(){a(this._element).remove(); this._element=null; this._anchor=null; return this; },position:function(){var c=this._anchor; var f=this._container; var e=this._getElementPosition(c,f); var j=this._getElementPosition(a(c).parents("table")[0],f); var g="rsTooltipRight"; var d=e.top+e.height/2; var l=a(this._element).outerWidth(); var h=a(this._element).height(); var i=e.right; var k; if(a(f).width()j.height){a(this._element).height(j.height).find(".rsToolTipArrow").show(); h=j.height; }k=d-h/2; if(k+h>j.bottom){k=j.bottom-h; }a(this._element).addClass(g).css({left:i,top:k}).find(".rsToolTipCallOut").css({top:d-k}); this._resolveScrollArrows(); return this; },populate:function(c){var e=this; var d=a("