Type.registerNamespace("Telerik.Web.UI.Scheduler.Views.Timeline");
Telerik.Web.UI.Scheduler.Views.Timeline.ModelBase=function(_1,_2){
this._owner=_1;
this._modelData=Sys.Serialization.JavaScriptSerializer.deserialize(_2);
};
Telerik.Web.UI.Scheduler.Views.Timeline.ModelBase.prototype={updateResizingAppointmentSize:function(_3,_4){
var _5=_3.parentNode.parentNode;
var _6=_5.offsetWidth;
var _7=_4.cellIndex-_5.cellIndex;
_7=Math.min(_7,this._getMaxAppointmentGrowth(_5));
var _8=Math.max(1,(_7+1))*_6;
if($telerik.isIE&&$telerik.quirksMode){
_8-=$telerik.getBorderBox(_5).horizontal*2;
}
_3.style.width=_8+"px";
},_getMaxAppointmentGrowth:function(_9){
return this._modelData.numberOfSlots;
}};
Telerik.Web.UI.Scheduler.Views.Timeline.ModelBase.registerClass("Telerik.Web.UI.Scheduler.Views.Timeline.ModelBase",null,Telerik.Web.UI.ISchedulerModel);
Telerik.Web.UI.Scheduler.Views.Timeline.Model=function(_a,_b){
Telerik.Web.UI.Scheduler.Views.Timeline.Model.initializeBase(this,[_a,_b]);
this._start=new Date(Date.parse(this._modelData.start));
this._slotDuration=this._modelData.slotDuration;
};
Telerik.Web.UI.Scheduler.Views.Timeline.Model.prototype={initialize:function(){
},getTimeSlotFromDomElement:function(_c){
var _d=this._getRawIndexFromDomElement(_c);
var _e=this._getTimeFromDomElement(_c);
return new Telerik.Web.UI.Scheduler.Views.Timeline.TimeSlot(_d,_e,this._slotDuration,_c);
},_getTimeFromDomElement:function(_f){
var _10=this._getRawIndexFromDomElement(_f);
return this._getTimeFromIndex(_10);
},_getTimeFromIndex:function(_11){
var _12=new Date(this._start.getTime());
Telerik.Web.UI.RadScheduler._incrementTime(_12,0,this._slotDuration*_11.intervalIndex);
return _12;
},_getRawIndexFromDomElement:function(_13){
while(_13&&(_13.tagName.toUpperCase()!="TD")){
_13=_13.parentNode;
}
if(_13){
return {intervalIndex:_13.cellIndex};
}
return null;
}};
Telerik.Web.UI.Scheduler.Views.Timeline.Model.registerClass("Telerik.Web.UI.Scheduler.Views.Timeline.Model",Telerik.Web.UI.Scheduler.Views.Timeline.ModelBase);
Telerik.Web.UI.Scheduler.Views.Timeline.TimeSlot=function(_14,_15,_16,_17){
this._rawIndex=_14;
this._startTime=_15;
this._duration=_16;
this._domElement=_17;
};
Telerik.Web.UI.Scheduler.Views.Timeline.TimeSlot.prototype={get_index:function(){
var _18=this.get_rawIndex();
return String.format("{0}",_18.intervalIndex);
},get_rawIndex:function(){
return this._rawIndex;
},get_startTime:function(){
return this._startTime;
},get_duration:function(){
return this._duration;
},get_isAllDay:function(){
return true;
},get_domElement:function(){
return this._domElement;
}};
Telerik.Web.UI.Scheduler.Views.Timeline.TimeSlot.registerClass("Telerik.Web.UI.Scheduler.Views.Timeline.TimeSlot",null,Telerik.Web.UI.ISchedulerTimeSlot);

