/*
 * Isomorphic SmartClient
 * Version v8.3_2012-11-20 (2012-11-20)
 * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
 * "SmartClient" is a trademark of Isomorphic Software, Inc.
 *
 * licensing@smartclient.com
 *
 * http://smartclient.com/license
 */
if(window.isc&&window.isc.module_Core&&!window.isc.module_Calendar){isc.module_Calendar=1;isc._moduleStart=isc._Calendar_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log&&isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={message:'Calendar load/parse time: '+(isc._moduleStart-isc._moduleEnd)+'ms',category:'loadTime'};if(isc.Log&&isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime');else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTM;else isc._preLog=[isc._pTM]}isc.definingFramework=true;if(window.isc&&isc.version!="v8.3_2012-11-20/LGPL Development Only"){isc.logWarn("SmartClient module version mismatch detected: This application is loading the core module from SmartClient version '"+isc.version+"' and additional modules from 'v8.3_2012-11-20/LGPL Development Only'. Mixing resources from different SmartClient packages is not supported and may lead to unpredictable behavior. If you are deploying resources from a single package you may need to clear your browser cache, or restart your browser."+(isc.Browser.isSGWT?" SmartGWT developers may also need to clear the gwt-unitCache and run a GWT Compile.":""))}
isc.ClassFactory.defineClass("Calendar","Canvas","DataBoundComponent");isc.A=isc.Calendar.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.defaultWidth="100%";isc.A.defaultHeight="100%";isc.A.year=new Date().getFullYear();isc.A.month=new Date().getMonth();isc.A.firstDayOfWeek=0;isc.A.baseStyle="calendar";isc.A.dayHeaderBaseStyle="calMonthDayHeader";isc.A.dayBodyBaseStyle="calMonthDayBody";isc.A.otherDayHeaderBaseStyle="calMonthOtherDayHeader";isc.A.otherDayBodyBaseStyle="calMonthOtherDayBody";isc.A.otherDayBlankStyle="calMonthOtherDayBlank";isc.A.selectedCellStyle="calendarCellSelected";isc.A.eventWindowStyle="eventWindow";isc.A.calMonthEventLinkStyle="calMonthEventLink";isc.A.workdayBaseStyle="calendarWorkday";isc.A.workdayStart="9:00am";isc.A.workdayEnd="5:00pm";isc.A.showWorkday=false;isc.A.workdays=[1,2,3,4,5];isc.A.scrollToWorkday=false;isc.A.nameField="name";isc.A.descriptionField="description";isc.A.startDateField="startDate";isc.A.endDateField="endDate";isc.A.leadingDateField="leadingDate";isc.A.trailingDateField="trailingDate";isc.A.labelColumnWidth=60;isc.A.timelineEventPadding=0;isc.A.eventDragGap=10;isc.A.laneNameField="lane";isc.A.eventWindowStyleField="eventWindowStyle";isc.A.canEditField="canEdit";isc.A.canDragEventField="canDrag";isc.A.weekEventBorderOverlap=false;isc.A.eventSnapGap=30;isc.A.showQuickEventDialog=true;isc.A.canCreateEvents=true;isc.A.canEditEvents=true;isc.A.canDeleteEvents=true;isc.A.canDragEvents=true;isc.A.showDateChooser=false;isc.A.disableWeekends=true;isc.A.showWeekends=true;isc.A.showDayHeaders=true;isc.A.showOtherDays=true;isc.A.showControlsBar=true;isc.A.eventAutoArrange=true;isc.A.eventOverlap=true;isc.A.eventOverlapPercent=10;isc.A.showTimelineView=false;isc.A.renderEventsOnDemand=true;isc.A.timelineGranularity="day";isc.A.timelineUnitsPerColumn=1;isc.A.canResizeTimelineEvents=false;isc.A.weekPrefix="Week";isc.A.showEventDescriptions=true;isc.A.allowEventOverlap=true;isc.A.sizeEventsToGrid=true;isc.A.dayViewTitle="Day";isc.A.weekViewTitle="Week";isc.A.monthViewTitle="Month";isc.A.timelineViewTitle="Timeline";isc.A.eventNameFieldTitle="Event Name";isc.A.saveButtonTitle="Save Event";isc.A.detailsButtonTitle="Edit Details";isc.A.cancelButtonTitle="Cancel";isc.A.previousButtonHoverText="Previous";isc.A.nextButtonHoverText="Next";isc.A.addEventButtonHoverText="Add an event";isc.A.datePickerHoverText="Choose a date";isc.A.invalidDateMessage="From must be before To";isc.A.dayViewConstructor="DaySchedule";isc.A.weekViewConstructor="WeekSchedule";isc.A.monthViewConstructor="MonthSchedule";isc.A.timelineViewConstructor="TimelineView";isc.A.mainViewDefaults={_constructor:isc.TabSet,defaultWidth:"80%",defaultHeight:"100%",tabBarAlign:"right",selectedTab:1};isc.A.dateChooserConstructor="DateChooser";isc.A.eventDialogDefaults={_constructor:isc.Window,showHeaderIcon:false,showMinimizeButton:false,showMaximumButton:false,canDragReposition:true,overflow:"visible",bodyProperties:{overflow:"visible"},width:400,height:100};isc.A.eventEditorDefaults={_constructor:isc.DynamicForm,padding:4,numCols:4,showInlineErrors:false,width:460,titleWidth:60};isc.A.eventEditorLayoutDefaults={_constructor:isc.Window,showHeaderIcon:false,showShadow:false,showMinimizeButton:false,showMaximumButton:false,canDragReposition:false};isc.A.addEventButtonDefaults={_constructor:isc.ImgButton,title:"",src:"[SKINIMG]actions/add.png",showRollOver:false,showDown:false,showFocused:false,width:16,height:16};isc.A.datePickerButtonDefaults={_constructor:isc.ImgButton,title:"",src:"[SKIN]/controls/date_control.gif",width:16,height:16,showRollOver:false,showFocused:false};isc.A.controlsBarDefaults={_constructor:isc.HLayout,defaultLayoutAlign:"center",height:25,membersMargin:5};isc.A.previousButtonDefaults={_constructor:isc.ImgButton,title:"",src:"[SKINIMG]actions/back.png",showFocused:false,width:16,height:16,click:"this.creator.previous()",showRollOver:false,showDown:false};isc.A.nextButtonDefaults={_constructor:isc.ImgButton,title:"",src:"[SKINIMG]actions/forward.png",showFocused:false,width:16,height:16,click:"this.creator.next()",showRollOver:false,showDown:false};isc.A.dateDisplayDefaults={_constructor:isc.Label,wrap:false,width:5,contents:"-"};isc.A.DAY="day";isc.A.WEEK="week";isc.A.MONTH="month";isc.A.rowHeight=isc.ListGrid.getInstanceProperty("cellHeight");isc.A.dateFormatter=null;isc.A.timeFormatter="toShortPaddedTime";isc.A.eventsOverlapGridLines=true;isc.A.$81i=/^\d{4}.\d\d?.\d\d?$/;isc.A.$81j=/^\d\d?.\d\d.\d{4}?$/;isc.B.push(isc.A.getVisibleStartDate=function isc_Calendar_getVisibleStartDate(){var _1=this.getSelectedView();if(_1==this.dayView)return this.chosenDate;if(_1==this.monthView)return this.$53m(0,0);return this.$53m(0,1)},isc.A.getVisibleEndDate=function isc_Calendar_getVisibleEndDate(){var _1=this.getSelectedView();if(_1==this.dayView)return this.chosenDate;return this.$53m(_1.getData().length-1,_1.getFields().length-1)},isc.A.getPeriodStartDate=function isc_Calendar_getPeriodStartDate(){var _1=this.getSelectedView(),_2=this.chosenDate;if(_1==this.dayView){return _2}else if(_1==this.weekView){return isc.DateUtil.getStartOf(_2,isc.DateUtil.getTimeUnitKey("week"))}else if(_1==this.monthView){return isc.DateUtil.getStartOf(_2,isc.DateUtil.getTimeUnitKey("month"))}},isc.A.getPeriodEndDate=function isc_Calendar_getPeriodEndDate(){var _1=this.getSelectedView(),_2=this.chosenDate;if(_1==this.dayView){return _2}else if(_1==this.weekView){return isc.DateUtil.getEndOf(_2,isc.DateUtil.getTimeUnitKey("week"))}else if(_1==this.monthView){return isc.DateUtil.getEndOf(_2,isc.DateUtil.getTimeUnitKey("month"))}},isc.A.addLane=function isc_Calendar_addLane(_1,_2){var _3=this.timelineView;if(!_3)return;if(!this.lanes)this.lanes=[];if(_2==null)_2=this.lanes.length;this.lanes.add(_1,_2);_3.setLanes(this.lanes)},isc.A.removeLane=function isc_Calendar_removeLane(_1){var _2=this.timelineView;if(!_2||!this.lanes)return;if(isc.isA.String(_1))_1=this.lanes.find("name",_1);if(_1){this.lanes.remove(_1);_2.setLanes(this.lanes)}},isc.A.initWidget=function isc_Calendar_initWidget(){if(!this.chosenDate)this.chosenDate=new Date();this.year=this.chosenDate.getFullYear();this.month=this.chosenDate.getMonth();if(this.timelineSnapGap!=null){this.snapGap=this.timelineSnapGap;delete this.timelineSnapGap}
if(this.timelineStartDate!=null){this.startDate=this.timelineStartDate.duplicate();delete this.timelineStartDate}
if(this.timelineEndDate!=null){this.endDate=this.timelineEndDate.duplicate();delete this.timelineEndDate}
if(this.timelineLabelFields!=null){this.laneFields=this.timelineLabelFields;this.timelineLabelFields=null}
if(this.eventTypeData!=null){this.lanes=isc.clone(this.eventTypeData);this.eventTypeData=null}
if(this.eventTypeField!=null){this.laneNameField=this.eventTypeField;delete this.eventTypeField}
if(this.showDescription!=null){this.showEventDescriptions=this.showDescription;delete this.showDescription}
if(this.canEditEventType!=null){this.canEditLane=this.canEditEventType;delete this.canEditEventType}
if(!this.data)this.data=this.getDefaultData();this.previousButtonDefaults.prompt=this.previousButtonHoverText;this.nextButtonDefaults.prompt=this.nextButtonHoverText;this.datePickerButtonDefaults.prompt=this.datePickerHoverText;this.addEventButtonDefaults.prompt=this.addEventButtonHoverText;this.$529();this.createChildren();this.$53a();if(!this.initialCriteria&&this.autoFetchData)this.initialCriteria=this.getNewCriteria();this.setData(null);this.invokeSuper(isc.Calendar,"initWidget")},isc.A.autoDetectFieldNames=function isc_Calendar_autoDetectFieldNames(){this.dataSource=isc.DS.getDataSource(this.dataSource);var _1=this.dataSource,_2=isc.getValues(_1.getFields()),_3=1024000,_4;if(this.fieldIsMissing(this.nameField,_1)){this.nameField=_1.getTitleField()}
if(this.fieldIsMissing(this.descriptionField,_1)){_2.sortByProperties(["length"],[false]);_4={length:0};for(var i=0;i<_2.length;i++){var _6=_2.get(i);if(!_6.type||_6.type=="text"||_6.type=="string"){if(_6.length>255&&_6.length<_3){this.descriptionField=_6.name;break}else if(_6.length&&_6.length<_3&&_6.length>_4.length){_4=_6}else if(!_6.length){if(!_4)_4=_6}}}
if(this.fieldIsMissing(this.descriptionField,_1)&&_4)
this.descriptionField=_4.name}
if(this.fieldIsMissing(this.startDateField,_1)){_4=null;for(var i=0;i<_2.length;i++){var _6=_2.get(i);if((_6.type=="date"||_6.type=="datetime")){if(_6.name.toLowerCase().indexOf("start")>=0||_6.name.toLowerCase().indexOf("begin")>=0)
{this.startDateField=_6.name;break}else _4=_6}}
if(this.fieldIsMissing(this.startDateField,_1)&&_4)
this.startDateField=_4.name}
if(this.fieldIsMissing(this.endDateField,_1)){_4=null;for(var i=0;i<_2.length;i++){var _6=_2.get(i);if((_6.type=="date"||_6.type=="datetime")){if(_6.name.toLowerCase().indexOf("end")>=0||_6.name.toLowerCase().indexOf("stop")>=0)
{this.endDateField=_6.name;break}else if(_6.name!=this.startDateField)
_4=_6}}
if(this.fieldIsMissing(this.endDateField,_1)&&_4)
this.endDateField=_4.name}},isc.A.fieldIsMissing=function isc_Calendar_fieldIsMissing(_1,_2){return(!_1||_1==""||(_2&&!_2.getField(_1)))},isc.A.getDefaultData=function isc_Calendar_getDefaultData(){return[]},isc.A.setData=function isc_Calendar_setData(_1){if(this.data==_1)return;if(this.data){this.ignore(this.data,"dataChanged");if(this.data.$31k&&isc.isA.Function(this.data.destroy))
this.data.destroy()}
if(_1)this.data=_1;if(!this.data)return;this.observe(this.data,"dataChanged","observer.dataChanged()");if(this.hasData()){this.dataChanged()}},isc.A.getData=function isc_Calendar_getData(){return this.data},isc.A.hasData=function isc_Calendar_hasData(){if(!this.data||(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown()))
{return false}else{return true}},isc.A.dataChanged=function isc_Calendar_dataChanged(){if(this.destroying||this.destroyed)return;if(this.$53e){this.logDebug('dataChanged, ignoring','calendar');this.$53e=false}else{this.logDebug('dataChanged, refreshing','calendar');this.refreshSelectedView()}},isc.A.destroy=function isc_Calendar_destroy(){if(this.data)this.ignore(this.data,"dataChanged");this.Super("destroy",arguments)},isc.A.refreshSelectedView=function isc_Calendar_refreshSelectedView(){if(this.dayViewSelected()){this.dayView.refreshEvents();if(this.monthView)this.monthView.refreshEvents()}else if(this.weekViewSelected()){this.weekView.refreshEvents();if(this.monthView)this.monthView.refreshEvents()}else if(this.monthViewSelected()){this.monthView.refreshEvents()}else if(this.timelineViewSelected()){this.timelineView.refreshEvents()}},isc.A.getSelectedView=function isc_Calendar_getSelectedView(){if(this.dayViewSelected()){return this.dayView}else if(this.weekViewSelected()){return this.weekView}else if(this.monthViewSelected()){return this.monthView}else if(this.timelineViewSelected()){return this.timelineView}},isc.A.setRowHeight=function isc_Calendar_setRowHeight(_1){this.rowHeight=_1;if(this.dayView){this.dayView.setCellHeight(this.rowHeight);this.dayView.refreshEvents()}
if(this.weekView){this.weekView.setCellHeight(this.rowHeight);this.weekView.refreshEvents()}},isc.A.getCurrentViewName=function isc_Calendar_getCurrentViewName(){var _1=this.getSelectedView();return _1!=null?_1.viewName:null},isc.A.setCurrentViewName=function isc_Calendar_setCurrentViewName(_1){var _2=this.mainView.tabs.find("viewName",_1);if(_2)this.mainView.selectTab(_2);return _1},isc.A.getEventWindowID=function isc_Calendar_getEventWindowID(_1){if(!_1)return null;var _2=this.getDataSource();if(_2&&_2.getPrimaryKeyFieldNames().length>0){var _3=_2.getPrimaryKeyFields();var _4="";for(var _5 in _3){_4+=_1[_5]}
return this.$65c[_4]}else{return _1.$65d}},isc.A.setEventWindowID=function isc_Calendar_setEventWindowID(_1,_2){if(!this.$65c)this.$65c=[];var _3=this.getDataSource();if(_3&&_3.getPrimaryKeyFieldNames().length>0){var _4=_3.getPrimaryKeyFields();var _5="";for(var _6 in _4){_5+=_1[_6]}
this.$65c[_5]=_2}else{_1.$65d=_2}},isc.A.clearTimeSelection=function isc_Calendar_clearTimeSelection(){if(this.dayView)this.dayView.clearSelection();if(this.weekView)this.weekView.clearSelection()},isc.A.getDayDiff=function isc_Calendar_getDayDiff(_1,_2,_3){return Math.abs(isc.Date.$1094(_1,_2,_3,false))},isc.A.getEventLeft=function isc_Calendar_getEventLeft(_1,_2){var _3=(this.isTimeline()?this.timelineView:_2?this.weekView:this.dayView);var _4=(_3.showLabelColumn&&_3.labelColumnPosition=="left");var _5=_4?_3.labelColumnWidth:0;var _6=_3.getColumnWidth(_3.isLabelCol(0)?1:0);if(_3.$53i){var _7=this.getDayDiff(_1[this.startDateField],this.chosenWeekStart,(this.showWeekends==false));_5=(_7*_6)+(_4?_3.labelColumnWidth:0)}
if(this.logIsDebugEnabled("calendar")){this.logDebug('calendar.getEventLeft() = '+_5+' for:'+isc.Log.echoFull(_1),'calendar')}
return _5},isc.A.setShowWeekends=function isc_Calendar_setShowWeekends(_1){this.showWeekends=_1;if(isc.isA.TabSet(this.mainView)){var _2=this.mainView.getSelectedTabNumber();this.mainView.removeTabs(this.mainView.tabs);if(this.dayView)this.dayView.destroy();if(this.weekView)this.weekView.destroy();if(this.monthView)this.monthView.destroy();var _3=this.$653();this.mainView.addTabs(_3);this.mainView.selectTab(_2)}else{var _4=this.children[0].members[1];var _5=_4.members[1];var _6=this.$653()[0].pane;_4.removeMember(_5);_5.destroy();_4.addMember(_6)}
this.$53a();this.setDateLabel()},isc.A.canEditEvent=function isc_Calendar_canEditEvent(_1){if(!_1)return false;else if(_1[this.canEditField]!=null)return _1[this.canEditField];else return this.canEditEvents},isc.A.getDateEditingStyle=function isc_Calendar_getDateEditingStyle(){if(!this.timelineViewSelected()){return"time"}
var _1=this.dateEditingStyle;if(!_1){if(this.dataSource)_1=this.getDataSource().getField(this.startDateField).type;if(!_1){switch(this.timelineGranularity){case"hour":_1="datetime";break;case"millisecond","second","minute":_1="time";break;default:_1="date";break}}}
return _1},isc.A.addEvent=function isc_Calendar_addEvent(_1,_2,_3,_4,_5,_6){if(_6==null)_6=true;if(!isc.isAn.Object(_5))_5={};var _7;if(isc.isA.Date(_1)){_7={};_7[this.startDateField]=_1;_7[this.endDateField]=_2;_7[this.nameField]=_3;_7[this.descriptionField]=_4;isc.addProperties(_7,_5)}else if(isc.isAn.Object(_1)){_7=_1}else{isc.logWarn('addEvent error: startDate parameter must be either a Date or an event record (Object)');return}
var _8=this;var _9=function(_11,_12,_13){var _10;if(isc.isAn.Array(_12))_10=_12[0];else _10=_12;if(!_10)_10=_7;if(_8.logIsDebugEnabled("calendar")){_8.logDebug('event added:'+this.echo(_10),'calendar')}
if(_8.$53b(_10[_8.startDateField],_10[_8.endDateField])){_8.dayView.addEvent(_10)}
if(_8.$53c(_10[_8.startDateField],_10[_8.endDateField])){_8.weekView.addEvent(_10)}
if(_8.$53d(_10[_8.startDateField],_10[_8.endDateField])){_8.monthView.refreshEvents()}
if(_8.eventAdded)_8.eventAdded(_10)}
if(_6)this.$53e=true;if(this.dataSource){isc.DataSource.get(this.dataSource).addData(_7,_9,{componentId:this.ID});return}else{this.$53e=true;this.data.add(_7);_9()}},isc.A.removeEvent=function isc_Calendar_removeEvent(_1,_2){if(_2==null)_2=true;var _3=_1[this.startDateField],_4=_1[this.endDateField];var _5=this;var _6=function(){if(_5.$53b(_3,_4)){_5.dayView.removeEvent(_1)}
if(_5.$53c(_3,_4)){_5.weekView.removeEvent(_1)}
if(_5.$53d(_3,_4)){_5.monthView.refreshEvents()}
if(_5.eventAutoArrange){if(_5.dayView)_5.dayView.refreshEvents();if(_5.weekView)_5.weekView.refreshEvents()}
if(_5.eventRemoved)_5.eventRemoved(_1)}
if(_2)this.$53e=true;if(this.dataSource){isc.DataSource.get(this.dataSource).removeData(_1,_6,{componentId:this.ID,oldValues:_1});return}else{this.data.remove(_1);_6()}},isc.A.updateEvent=function isc_Calendar_updateEvent(_1,_2,_3,_4,_5,_6,_7,_8){if(_7==null)_7=true;if(!isc.isAn.Object(_6))_6={};var _9=this;var _10=_1[this.startDateField];var _11=_1[this.endDateField];var _12=function(_18,_19,_20){var _13;if(isc.isAn.Array(_19))_13=_19[0];else _13=_19;if(!_13)_13=_1;if(_9.$53b(_10,_11)||_9.$53b(_2,_3)){_9.dayView.refreshEvents()}
if(_9.$53c(_2,_3)){_9.weekView.updateEventWindow(_13)}
if(_9.$53d(_2,_3)){_9.monthView.refreshEvents()}
if(_9.$664(_2,_3)){_9.timelineView.updateEventWindow(_13)}
if(_9.eventChanged)_9.eventChanged(_13)}
if(_7)this.$53e=true;if(this.dataSource){var _14,_15=isc.DataSource.get(this.dataSource);var _16={};_16[this.startDateField]=_2.duplicate();_16[this.endDateField]=_3.duplicate();_16[this.descriptionField]=_5;_16[this.nameField]=_4;if(_8)_16[this.laneNameField]=_8;var _17=isc.addProperties({},_1,_16,_6);_15.updateData(_17,_12,{oldValues:_1,componentId:this.ID});return}else{_1[this.startDateField]=_2.duplicate();_1[this.endDateField]=_3.duplicate();_1[this.descriptionField]=_5;_1[this.nameField]=_4;if(_8)_1[this.laneNameField]=_8;if(_1.$646)_1.$646.visited=false;;isc.addProperties(_1,_6);_12()}},isc.A.eventsAreSame=function isc_Calendar_eventsAreSame(_1,_2){if(this.dataSource){var _3=isc.DataSource.get(this.dataSource),_4=_3.getPrimaryKeyFieldNames(),_5=true;for(var i=0;i<_4.length;i++){var _7=_4[i];if(_1[_7]!=_2[_7]){_5=false;break}}
return _5}else{return(_1===_2)}},isc.A.getEventTitle=function isc_Calendar_getEventTitle(_1){return _1[this.nameField]},isc.A.getEventHoverHTML=function isc_Calendar_getEventHoverHTML(_1,_2){var _3=this;var _4=_1[_3.startDateField],_5=_4.toShortDate(this.dateFormatter,false),_6=isc.Time.toTime(_4,this.timeFormatter,true),_7=_1[_3.endDateField],_8=_7.toShortDate(this.dateFormatter,false),_9=isc.Time.toTime(_7,this.timeFormatter,true),_10=_1[_3.nameField],_11=_1[_3.descriptionField],_12=_5+"&nbsp;"+_6+"&nbsp;-&nbsp;"+_9;if(this.isTimeline()){if(_4.getDate()!=_7.getDate()){_12=_5+"&nbsp;"+_6+"&nbsp;-&nbsp;"+_8+"&nbsp;"+_9}}
_12+=(_10||_11?"</br></br>":"")+(_10?_10+"</br></br>":"")+(_11?_11:"");return _12},isc.A.$53b=function isc_Calendar__shouldRefreshDay(_1,_2){if(!this.dayView)return false;var _3=new Date(this.year,this.month,this.chosenDate.getDate(),0,0);var _4=new Date(this.year,this.month,this.chosenDate.getDate(),23,59);if(this.dayView.body&&_3.getTime()<=_1.getTime()&&_4.getTime()>=_1.getTime()){return true}else return false},isc.A.$53c=function isc_Calendar__shouldRefreshWeek(_1,_2){if(!this.weekView)return false;var _3=this.chosenWeekEnd.duplicate();_3.setMinutes(_3.getMinutes()+1);if(this.weekView.body&&this.chosenWeekStart.getTime()<=_1.getTime()&&_3.getTime()>=_2.getTime()){return true}else return false},isc.A.$53d=function isc_Calendar__shouldRefreshMonth(_1,_2){if(!this.monthView)return false;var _3=new Date(this.year,this.month,-7);var _4=new Date(this.year,this.month,37);if(_3.getTime()<=_1.getTime()&&_4.getTime()>=_2.getTime()){return true}else return false},isc.A.$664=function isc_Calendar__shouldRefreshTimelineView(_1,_2){if(this.showTimelineView)return true;else return false},isc.A.$53f=function isc_Calendar__getNewEventWindow(_1){var _2=this.canEditEvent(_1);var _3=this.canDeleteEvents==null?_2:this.canDeleteEvents;var _4=_1[this.eventWindowStyleField]||this.eventWindowStyle;return this.createAutoChild("eventWindow",{calendar:this,className:_4,baseStyle:_4,canDragReposition:_2,canDragResize:_2,_redrawWithParent:false,showCloseButton:_3,event:_1,descriptionText:_1[this.descriptionField]},isc.EventWindow)},isc.A.$53g=function isc_Calendar__getEventsInRange(_1,_2){var _3=[],_4=Date.getWeekendDays(),_5=this.data.getLength();for(var i=0;i<_5;i++){var _7=this.data.get(i);if(!_7||!_7[this.startDateField])return[];if(_7[this.startDateField].getTime()>=_1.getTime()&&_7[this.startDateField].getTime()<=_2.getTime()&&(this.showWeekends||!_4.contains(_7[this.startDateField].getDay()))){_3.add(_7)}}
return _3},isc.A.$64h=function isc_Calendar__getEventsTouchingRange(_1,_2,_3){var _4=[],_5=Date.getWeekendDays(),_6=_1.getTime(),_7=this.getDayEnd(_1),_8=_2.getHours()!=0?_2.getTime():_7.getTime(),_9=_6,_10=_8,_11=false,_12=this.data.getLength(),_13=_1.getDay();var _14=(_2.getHours()==0||Date.compareDates(_1,_2)<0)?_7:_2;while(!_11){for(var i=0;i<_12;i++){var _16=this.data.get(i),_17=_16[this.startDateField],_18=_16[this.endDateField];if(!_17)return[];if(_18.getHours()==0||_18<_17){_18=_7}
var _19=_17.getTime(),_20=_17.getDay(),_21=_18.getTime(),_22=_18.getDay();var _23=(_19>=_6&&_19<_8&&_20==_13);var _24=(_21>_6&&_21<=_8&&_22==_13);var _25=(_19<=_6)&&(_21>=_8)&&(_20==_13);if((_23||_24||_25)&&(this.showWeekends||!_5.contains(_17.getDay())))
{_4.add(_16);if(_3){if(_17.getTime()<_9){_9=_17.getTime()}
if(_18.getTime()>_10){_10=_18.getTime()}}}}
if(!_3||(_9==_6&&_10==_8)){_11=true}else{_6=_9;_8=_10;_4.clear()}}
return _4},isc.A.$64i=function isc_Calendar__findEventWindow(_1,_2){var _3=(this.isTimeline()?this.timelineView:_2?this.weekView:this.dayView);if(!_3.body||!_3.body.children)return;var _4=_3.body.children;if(this.dataSource)this.$53s=isc.DataSource.get(this.dataSource).getLocalPrimaryKeyFields();for(var i=0;i<_4.length;i++){if(isc.isAn.EventWindow(_4[i])&&_3.areSame(_4[i].event,_1)&&_4[i].$53i==_2){return _4[i]}}
return false},isc.A.$64j=function isc_Calendar__prepareAutoArrangeOffsets(_1,_2){var _3=[],_4=60/this.eventSnapGap,_5=24*_4,_6=[new Array(_5),new Array(_5),new Array(_5),new Array(_5),new Array(_5),new Array(_5),new Array(_5)];for(var i=0;i<_5;i++){_3.add({usedCol:[0,0,0,0,0,0,0],assignedCol:[0,0,0,0,0,0,0],exactTime:[0,0,0,0,0,0,0]})}
var _8=_1.getLength();for(var i=0;i<_8;i++){var _9=_1.get(i);var _10=_9[this.startDateField],_11=_9[this.endDateField],_12=this.getEventLength(_10,_11),_13=_10.getDay();var _14=_10.getHours(),_15=_10.getMinutes(),_16=_15%this.eventSnapGap;if(_16){_15=_15-_16}
if(_14==24)_14=0;var _17=_11.getDay(),_18=_11.getHours(),_19=_11.getMinutes(),_20=_19%this.eventSnapGap;if(_17>_13){_18=24;_19=0;_20=0}
if(_20){_19=_19+(this.eventSnapGap-_20);if(_19==60){_19=0;_18++}}
var _21=(_14*_4)+(_15/this.eventSnapGap),_22=(_18*_4)+(_19/this.eventSnapGap);_9.$64k=0;_9.$64l=0;_9.$85h=_21;_9.$85i=_22;for(var _23=_21;_23<_22;_23++){var _24=_3[_23];var _25=_3[_23].usedCol[_13];var _26=_3[_23].assignedCol[_13];var _27=_3[_23].exactTime[_13];if(_6[_13][_23]==null)_6[_13][_23]=0;if(_23==_21){var _28=_26!=0;_9.$64k=_26;if(this.eventOverlap){if(!this.eventOverlapIdenticalStartTimes){_9.$64m=_27==0}else{_9.$64m=true}
_27=1}
_26++;if(_26>_6[_13][_23]){_6[_13][_23]=_26}
if(!_28&&_25!=0){_9.$64l=_25;_26=_25+1}else{if(_26<=_25){_9.$64l=_25;_26=_25+1}else{_9.$64l=_6[_13][_23]}}}else{if(_28){if(_26==0){if(_25==0){_25=_9.$64k}}else{if(_25==0){if(_9.$64k>_26){_25=_9.$64k}else{_26=_9.$64k+1}}else if(_26<_25){_26=_25+1}}}else{if(_26+1<_25){_26++}else{_26=_25+1}}}
_3[_23].usedCol[_13]=_25;_3[_23].assignedCol[_13]=_26;_3[_23].exactTime[_13]=_27}}
return _6},isc.A.getDayEnd=function isc_Calendar_getDayEnd(_1){return new Date(_1.getFullYear(),_1.getMonth(),_1.getDate(),23,59,59)},isc.A.isTimeline=function isc_Calendar_isTimeline(){var _1=this.getCurrentViewName()=="timeline";return _1},isc.A.$64n=function isc_Calendar__renderEventRange(_1,_2,_3){var _4=(this.isTimeline()?this.timelineView:_1?this.weekView:this.dayView);if(!_4.isDrawn())return;var _5=_4.getRowHeight(1),_6=_4.getColumnWidth(_4.isLabelCol(0)?1:0);var _7=_2,_8=_3;if(Date.compareDates(_7,_8)<0||(_8.getHours()==0)){_8=this.getDayEnd(_7)}
var _9=this.$64h(_7,_8,true);_9.sortByProperties([this.startDateField,this.endDateField],[true,false]);var _10=this.$64j(_9,_4);for(var i=0;i<_10.length;i++){for(var j=0;j<_10[i].length;j++){if(_10[i][j]==0)_10[i][j]=1}}
_9.unsort();_9.sortByProperties(["$64k"],[true]);var _13={min:_9.getProperty("$85h").min(),max:_9.getProperty("$85i").max()}
var _14=_9.getLength();for(var i=0;i<_14;i++){var _15=_9.get(i),_16=_15[this.startDateField],_17=_15[this.endDateField];var _18=_16.getDay();var _19=_10[_18];var _20=_19.max(_13.min,_13.max-1);if(_20==null){var _21=Math.max(_13.min,_13.max-1);if(_21!=null&&_19[_21]!=null){_20=_19[_21]}}
var _22=_6/Math.max(1,_20);if(_15.$64l==0)_15.$64l=1;var _23=this.getEventLeft(_15,_1);_23+=(_15.$64k*_22);var _24=(_15.$64l-_15.$64k)*_22;if(this.eventOverlap&&_15.$64m){if(_15.$64k>0){_23-=_22*(this.eventOverlapPercent/100);_24+=_22*(this.eventOverlapPercent/100)}}
var _25=_17.getHours(),_26=_17.getMinutes();if(_25==0&&(_26==0||_17.getDate()!=_16.getDate())){_25=24;_26=0}
var _27=(_25-_16.getHours())*(_5*2)
if(this.weekEventBorderOverlap&&_4.$53i)_24+=1;if(_16.getMinutes()>0){_27-=this.$54g(_16.getMinutes(),_5)}
if(_26>0){_27+=this.$54g(_26,_5)}
var _28=_16.getHours()*(_5*2);if(_16.getMinutes()>0){_28+=this.$54g(_16.getMinutes(),_5)}
var _29=this.$64i(_15,_1);if(this.eventsOverlapGridLines){_23-=1;_24+=1;_28-=1;_27+=1}
if(_15.$64l==_19.max(_13.min,_13.max-1)||_19.max(_13.min,_13.max-1)==0){_24-=this.eventDragGap}
if(_29){_29.renderEvent(_28,_23,_24,_27)}}},isc.A.getTimeSlotsTouchedByEventRange=function isc_Calendar_getTimeSlotsTouchedByEventRange(_1){var _2=this.$64h(_1[this.startDateField],_1[this.endDateField],true);var _3=_2.getProperty("$85h").min();var _4=_2.getProperty("$85i").max();return{min:_3,max:_4}},isc.A.$529=function isc_Calendar__setChosenWeek(){var _1=this.chosenWeekStart=new Date(this.year,this.month,this.chosenDate.getDate()
-this.chosenDate.getDay()+this.firstDayOfWeek);if(Date.compareDates(this.chosenDate,_1)==1){this.chosenWeekStart.setDate(this.chosenWeekStart.getDate()-7)}
this.chosenWeekEnd=new Date(_1.getFullYear(),_1.getMonth(),_1.getDate()+6,23,59);if(Date.compareDates(this.chosenDate,this.chosenWeekEnd)==-1){this.chosenWeekStart.setDate(this.chosenWeekStart.getDate()+7);this.chosenWeekEnd.setDate(this.chosenWeekEnd.getDate()+7)}},isc.A.setChosenDate=function isc_Calendar_setChosenDate(_1){this.year=_1.getFullYear();this.month=_1.getMonth();this.$53h=this.chosenDate.duplicate();this.chosenDate=_1;this.$529();if(this.$53h.getFullYear()!=this.year||this.$53h.getMonth()!=this.month){if(this.monthView)this.monthView.refreshEvents()}
var _2=new Date(this.$53h.getFullYear(),this.$53h.getMonth(),this.$53h.getDate()-this.$53h.getDay());var _3=new Date(_2.getFullYear(),_2.getMonth(),_2.getDate()+6);var _4=this.chosenDate.getTime();if(_4<_2.getTime()||_4>_3.getTime()){if(this.weekView){this.weekView.refreshEvents();this.$53a()}}
if(_4!=this.$53h.getTime()){if(this.dayView){this.dayView.refreshStyle();this.dayView.refreshEvents()}}
this.setDateLabel();this.dateChanged()},isc.A.dateIsWorkday=function isc_Calendar_dateIsWorkday(_1){return this.workdays.contains(_1.getDay())},isc.A.adjustCriteria=function isc_Calendar_adjustCriteria(_1){return _1},isc.A.getNewCriteria=function isc_Calendar_getNewCriteria(){var _1={},_2;if(this.fetchMode=="timeline"){_2=this.timelineView;var _3={_constructor:"AdvancedCriteria",operator:"and",criteria:[{fieldName:this.startDateField,operator:"greaterThan",value:_2.startDate},{fieldName:this.endDateField,operator:"lessThan",value:_2.endDate}]};_1=this.adjustCriteria(_3)}
return _1},isc.A.$53a=function isc_Calendar__setWeekTitles(){if(!this.weekView)return;var _1=this.chosenWeekStart.duplicate();var _2=Date.getShortDayNames();var _3=Date.getWeekendDays();for(var i=1;i<8;i++){if(this.weekView.getFieldNum("day"+i)>=0){var _5=_1.toShortDate(this.dateFormatter,false);if(_5.match(this.$81i)!=null)_5=_5.substring(5);else if(_5.match(this.$81j))_5=_5.substring(0,_5.length-5)
var _6=_2[_1.getDay()]+" "+_5;var _7={title:_6,align:"right",$654:_1.getDay(),$658:_1.getDate(),$659:_1.getMonth(),$66a:_1.getFullYear()}
this.weekView.setFieldProperties("day"+i,_7);if(this.weekView.header)this.weekView.header.markForRedraw()}
_1.setDate(_1.getDate()+1)}},isc.A.next=function isc_Calendar_next(){var _1;if(this.dayViewSelected()){_1=new Date(this.year,this.month,this.chosenDate.getDate()+1);if(!this.showWeekends){var _2=Date.getWeekendDays();for(var i=0;i<_2.length;i++){if(_2.contains(_1.getDay()))_1.setDate(_1.getDate()+1)}}}else if(this.weekViewSelected()){_1=new Date(this.year,this.month,this.chosenDate.getDate()+7)}else if(this.monthViewSelected()){_1=new Date(this.year,this.month+1,1)}else if(this.timelineViewSelected()){_1=this.chosenDate.duplicate();this.timelineView.nextOrPrev(true)}
this.dateChooser.setData(_1);this.setChosenDate(_1)},isc.A.previous=function isc_Calendar_previous(){if(this.dayViewSelected()){var _1=new Date(this.year,this.month,this.chosenDate.getDate()-1);if(!this.showWeekends){var _2=Date.getWeekendDays();for(var i=0;i<_2.length;i++){if(_2.contains(_1.getDay()))_1.setDate(_1.getDate()-1)}}}else if(this.weekViewSelected()){var _1=new Date(this.year,this.month,this.chosenDate.getDate()-7)}else if(this.monthViewSelected()){var _1=new Date(this.year,this.month-1,1)}else if(this.timelineViewSelected()){_1=this.chosenDate.duplicate();this.timelineView.nextOrPrev(false)}
this.dateChooser.setData(_1);this.setChosenDate(_1)},isc.A.dataArrived=function isc_Calendar_dataArrived(){return true},isc.A.draw=function isc_Calendar_draw(_1,_2,_3,_4){this.invokeSuper(isc.Calendar,"draw",_1,_2,_3,_4);if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&this.dataSource){this.observe(this.data,"dataArrived","observer.dataArrived(arguments[0], arguments[1])")}
if(this.mainView.isA("TabSet")){if(this.showControlsBar!=false){this.mainView.addChild(this.controlsBar);this.controlsBar.moveAbove(this.mainView.tabBar)}}});isc.evalBoundary;isc.B.push(isc.A.$653=function isc_Calendar__getTabs(){var _1=[];if(this.showDayView!=false){this.dayView=this.createAutoChild("dayView",{baseStyle:this.baseStyle,viewName:"day",cellHeight:this.rowHeight});_1.add({title:this.dayViewTitle,pane:this.dayView,viewName:"day"})}
if(this.showWeekView!=false){this.weekView=this.createAutoChild("weekView",{$53i:true,baseStyle:this.baseStyle,viewName:"week",cellHeight:this.rowHeight});_1.add({title:this.weekViewTitle,pane:this.weekView,viewName:"week"})}
if(this.showMonthView!=false){this.monthView=this.createAutoChild("monthView",{baseStyle:this.baseStyle,viewName:"month",bodyConstructor:"MonthScheduleBody"});_1.add({title:this.monthViewTitle,pane:this.monthView,viewName:"month"})}
if(this.showTimelineView!=false){this.timelineView=this.createAutoChild("timelineView",{baseStyle:this.baseStyle,viewName:"timeline"});_1.add({title:this.timelineViewTitle,pane:this.timelineView,viewName:"timeline"})}
return _1},isc.A.$655=function isc_Calendar__createTabSet(_1){if(_1.length>1){this.mainView=this.createAutoChild("mainView",{tabs:_1,tabSelected:function(_3,_4,_5,_6){this.creator.$567=_4.viewName;this.creator.setDateLabel()}});if(this.currentViewName){var _2=_1.find("viewName",this.currentViewName);if(_2)this.mainView.selectTab(_2)}}else{this.mainView=_1[0].pane}},isc.A.createChildren=function isc_Calendar_createChildren(){var _1=this.$653();this.$655(_1);var _2=20;if(this.showControlsBar!=false){this.dateDisplay=this.createAutoChild("dateDisplay");this.addEventButton=this.createAutoChild("addEventButton",{click:function(){var _3=this.creator;var _4=_3.getCurrentViewName();_3.eventDialog.event=null;_3.eventDialog.items[0].createFields(false);var _5=new Date(),_6=_3.chosenDate.duplicate();if(_4=="day"){_5=_6}else if(_4=="week"){if(_3.chosenWeekStart.getTime()>_5.getTime()){_5=_3.chosenWeekStart.duplicate()}
if(!this.showWeekends){var _7=Date.getWeekendDays();for(var i=0;i<_7.length;i++){if(_7.contains(_5.getDay()))_5.setDate(_5.getDate()+1)}}
_5.setMinutes(0);if(_5.getHours()>22){_5.setDate(_5.getDate()+1);_5.setHours(0)}
else _5.setHours(_5.getHours()+1)}else if(_4=="month"){_6.setDate(1);if(_6.getTime()>_5.getTime())_5=_6}
_3.eventDialog.setDate(_5);_3.eventDialog.setPageLeft(_3.getPageLeft());_3.eventDialog.setPageTop(this.getPageTop()+this.getVisibleHeight());_3.eventDialog.show()}});this.datePickerButton=this.createAutoChild("datePickerButton",{click:function(){var _3=this.creator;if(this.$54x){this.$54x.setData(_3.chosenDate);this.$54x.draw()}else{this.$54x=isc.DateChooser.create({calendar:this.creator,autoDraw:false,showCancelButton:true,autoClose:true,disableWeekends:this.creator.disableWeekends,firstDayOfWeek:this.creator.firstDayOfWeek,showWeekends:this.creator.showWeekends,dateClick:function(_36,_37,_38){var _9=new Date(_36,_37,_38);this.setData(_9);this.calendar.dateChooser.dateClick(_36,_37,_38);this.close()}});this.$54x.setData(_3.chosenDate);_3.addChild(this.$54x);this.$54x.placeNextTo(this,"bottom",true)}}});this.previousButton=this.createAutoChild("previousButton",{});this.nextButton=this.createAutoChild("nextButton",{})}
var _10=[];if(this.showPreviousButton!=false)_10.add(this.previousButton);if(this.showDateDisplay!=false)_10.add(this.dateDisplay);if(this.showDatePickerButton!=false)_10.add(this.datePickerButton);if(this.canCreateEvents&&this.showAddEventButton!=false)_10.add(this.addEventButton);if(this.showNextButton!=false)_10.add(this.nextButton);if(this.showControlsBar!=false){this.controlsBar=this.createAutoChild("controlsBar",{members:_10})}
this.dateChooser=this.createAutoChild("dateChooser",{disableWeekends:this.disableWeekends,showWeekends:this.showWeekends,chosenDate:this.chosenDate,month:this.month,year:this.year,dateClick:function(_36,_37,_38){var _9=new Date(_36,_37,_38);this.setData(_9);this.creator.setChosenDate(_9)},showPrevYear:function(){this.year--;this.dateClick(this.year,this.month,this.chosenDate.getDate())},showNextYear:function(){this.year++;this.dateClick(this.year,this.month,this.chosenDate.getDate())},showPrevMonth:function(){if(--this.month==-1){this.month=11;this.year--}
this.dateClick(this.year,this.month,1)},showNextMonth:function(){if(++this.month==12){this.month=0;this.year++}
this.dateClick(this.year,this.month,1)}});this.eventDialog=this.createAutoChild("eventDialog",{items:[isc.DynamicForm.create({autoDraw:false,padding:4,calendar:this,saveOnEnter:true,useAllDataSourceFields:true,$642:["name"],getCustomValues:function(){if(!this.calendar.eventDialogFields)return;var _11=this.$642;var _12=this.calendar.eventDialogFields;var _13={}
for(var i=0;i<_12.length;i++){var _14=_12[i];if(_14.name&&!_11.contains(_14.name)){_13[_14.name]=this.getValue(_14.name)}}
return _13},setCustomValues:function(_36){if(!this.calendar.eventDialogFields)return;var _11=this.$642;var _12=this.calendar.eventDialogFields;for(var i=0;i<_12.length;i++){var _14=_12[i];if(_14.name&&!_11.contains(_14.name)){this.setValue(_14.name,_36[_14.name])}}},createFields:function(_36){var _15=_36?"staticText":"text";var _3=this.calendar;var _16=[{name:_3.nameField,title:_3.eventNameFieldTitle,type:_15,width:250},{name:"save",title:_3.saveButtonTitle,type:"SubmitItem",endRow:false},{name:"details",title:_3.detailsButtonTitle,type:"button",startRow:false,click:function(_31,_37){_31.calendar.$53j(_31.calendar.eventDialog.event)}}];if(_36)_16.removeAt(1);var _17=isc.DataSource.create({addGlobalId:false,fields:_16});this.setDataSource(_17);this.setFields(isc.shallowClone(this.calendar.eventDialogFields))},submit:function(){var _3=this.calendar,_18=_3.eventDialog.event,_19=_3.eventDialog.currentStart,_20=_3.eventDialog.currentEnd;if(!this.validate())return;if(_18){_3.updateEvent(_18,_19,_20,this.getItem(this.calendar.nameField).getValue(),_18[_3.descriptionField],this.getCustomValues(),true);_3.eventDialog.hide()}else{_3.addEvent(_19,_20,this.getItem(this.calendar.nameField).getValue(),"",this.getCustomValues(),true);_3.eventDialog.hide()}}})],setDate:function(_36,_37){if(!_37){if(_36.getHours()==23&&_36.getMinutes()==30){_37=new Date(_36.getFullYear(),_36.getMonth(),_36.getDate()+1)}else{_37=new Date(_36.getFullYear(),_36.getMonth(),_36.getDate(),_36.getHours()+1,_36.getMinutes())}}
this.setTitle(this.creator.$53k(_36,_37));this.currentStart=_36;this.currentEnd=_37;this.items[0].getItem(this.creator.nameField).setValue("")},setEvent:function(_36){this.event=_36;var _21=this.items[0];if(this.creator.eventDialogFields){_21.clearErrors(true);_21.setCustomValues(_36)}
this.setDate(_36[this.creator.startDateField],_36[this.creator.endDateField]);_21.getItem(this.creator.nameField).setValue(_36[this.creator.nameField])},closeClick:function(){this.Super('closeClick');if(this.creator.dayView)this.creator.dayView.clearSelection();if(this.creator.weekView)this.creator.weekView.clearSelection()},show:function(){if(this.creator.showQuickEventDialog){if(!this.isDrawn())this.draw();this.Super('show');this.items[0].getItem(this.creator.nameField).focusInItem()}else{this.creator.$53j(this.event)}},hide:function(){this.Super('hide');this.moveTo(0,0)}});this.eventEditor=this.createAutoChild("eventEditor",{useAllDataSourceFields:true,initWidget:function(){this.invokeSuper(isc.DynamicForm,"initWidget",arguments);this.timeFormat=this.creator.timeFormat;var _16=[],_3=this.creator,_22=_3.getDateEditingStyle();if(_3.isTimeline()&&_3.canEditLane){var _23=_3.timelineView.data,_24={};for(var i=0;i<_23.length;i++){var _25=_23[i].name||_23[i][_3.laneNameField],_26=_23[i].title||_25;_24[_25]=_26}
var _27={title:"Lane",type:"select",valueMap:_24,endRow:true};_27.name=_3.laneNameField;_16.add(_27)}
if(_22=="date"||_22=="datetime"){_16.addList([{name:"startDate",title:"From",type:_22,endRow:true},{name:"endDate",title:"To",type:_22,endRow:true},{name:"invalidDate",type:"blurb",colSpan:4,visible:false,defaultValue:this.creator.invalidDateMessage,cellStyle:this.errorStyle||"formCellError",endRow:true}])}else if(_22=="time"){_16.addList([{name:"startHours",title:"From",type:"integer",width:60,editorType:"select",valueMap:this.getTimeValues("hours")},{name:"startMinutes",showTitle:false,type:"integer",width:60,editorType:"select",valueMap:this.getTimeValues("minutes")},{name:"startAMPM",showTitle:false,type:"select",width:60,valueMap:this.getTimeValues(),endRow:true},{name:"invalidDate",type:"blurb",colSpan:4,visible:false,defaultValue:this.creator.invalidDateMessage,cellStyle:this.errorStyle||"formCellError",endRow:true},{name:"endHours",title:"To",type:"integer",width:60,editorType:"select",valueMap:this.getTimeValues("hours")},{name:"endMinutes",showTitle:false,type:"integer",width:60,editorType:"select",valueMap:this.getTimeValues("minutes")},{name:"endAMPM",showTitle:false,type:"select",width:60,valueMap:this.getTimeValues(),endRow:true}]);this.setColWidths([this.titleWidth,60,60,"*"])}
_16.addList([{name:"name",title:"Name",type:"text",colSpan:"*",width:"*"},{name:"description",title:"Description",type:"textArea",colSpan:"*",width:"*",height:50}]);var _28=isc.DataSource.create({addGlobalId:false,fields:_16});this.setDataSource(_28);this.setFields(isc.shallowClone(this.creator.eventEditorFields))},getTimeValues:function(_36,_37){if(!_37)_37=0;var _29={};if(_36=="hours"){for(var i=_37;i<12;i++){_29[(i+1)+""]=(i+1)}}else if(_36=="minutes"){for(var i=0;i<60;i++){var _30=i<10?"0"+i:""+i;_29[i+""]=_30}}else{_29["am"]="am";_29["pm"]="pm"}
return _29},$642:["startHours","startMinutes","startAMPM","endHours","endMinutes","endAMPM","name","description","startDate","endDate"],getCustomValues:function(){if(!this.creator.eventEditorFields)return;var _11=this.$642;var _12=this.creator.eventEditorFields;var _13={}
for(var i=0;i<_12.length;i++){var _14=_12[i];if(_14.name&&!_11.contains(_14.name)){_13[_14.name]=this.getValue(_14.name)}}
return _13},setCustomValues:function(_36){if(!this.creator.eventEditorFields)return;var _11=this.$642;var _12=this.creator.eventEditorFields;for(var i=0;i<_12.length;i++){var _14=_12[i];if(_14.name&&!_11.contains(_14.name)){this.setValue(_14.name,_36[_14.name])}}}});this.eventEditorLayout=this.createAutoChild("eventEditorLayout",{items:[this.eventEditor,isc.HLayout.create({membersMargin:10,layoutMargin:10,autoDraw:false,members:[isc.IButton.create({autoDraw:false,title:this.saveButtonTitle,calendar:this,click:function(){this.calendar.addEventOrUpdateEventFields()}}),isc.IButton.create({autoDraw:false,title:this.cancelButtonTitle,calendar:this,click:function(){this.calendar.eventEditorLayout.hide()}})]})],setDate:function(_36,_37,_38){if(!_38)_38="";if(!_37){_37=new Date(_36.getFullYear(),_36.getMonth(),_36.getDate(),_36.getHours()+1,_36.getMinutes())}
var _3=this.creator;this.setTitle(_3.$53k(_36,_37));this.currentStart=_36;this.currentEnd=_37;var _22=_3.getDateEditingStyle(),_31=this.items[0];if(_22=="date"||_22=="datetime"){_31.setValue("startDate",_36.duplicate());_31.setValue("endDate",_37.duplicate())}else if(_22=="time"){_31.setValue("startHours",this.getHours(_36.getHours()));_31.setValue("endHours",this.getHours(_37.getHours()));_31.setValue("startMinutes",_36.getMinutes());_31.setValue("endMinutes",_37.getMinutes());if(!_3.twentyFourHourTime){_31.setValue("startAMPM",this.getAMPM(_36.getHours()));_31.setValue("endAMPM",this.getAMPM(_37.getHours()))}}
_31.setValue("name",_38);_31.setValue("description","")},getHours:function(_36){if(this.creator.twentyFourHourTime)return _36;else return this.creator.$53n(_36)},getAMPM:function(_36){if(_36<12)return"am";else return"pm"},setEvent:function(_36){var _31=this.items[0],_3=this.creator,_32=_31.getItem(_3.laneNameField);this.event=_36;if(_3.eventEditorFields){_31.clearErrors(true);_31.setCustomValues(_36)}
if(_32){_32.setValue(_36[_3.laneNameField])}
this.setDate(_36[_3.startDateField],_36[_3.endDateField]);_31.setValue("name",_36[_3.nameField]);_31.setValue("description",_36[_3.descriptionField]);this.originalStart=isc.clone(this.currentStart);this.originalEnd=isc.clone(this.currentEnd)},hide:function(){this.Super('hide');if(this.creator.dayView)this.creator.dayView.clearSelection();if(this.creator.weekView)this.creator.weekView.clearSelection();this.creator.eventEditor.hideItem("invalidDate")},sizeMe:function(){this.setWidth(this.creator.mainView.getVisibleWidth());this.setHeight(this.creator.mainView.getVisibleHeight());this.setLeft(this.creator.mainView.getLeft())}});if(!this.children)this.children=[];var _33=[];var _34=[];_34.add(this.dateChooser);if(this.showDateChooser){_33.add(isc.VLayout.create({autoDraw:false,width:"20%",membersMargin:10,layoutTopMargin:10,members:_34}))}
if(this.mainView.isA("TabSet")){_33.add(this.mainView)}else{if(this.showControlsBar!=false){var _35=isc.HLayout.create({autoDraw:false,height:this.controlsBar.getVisibleHeight(),width:"100%"});_35.addMember(isc.LayoutSpacer.create({autoDraw:false,width:"*"}));_35.addMember(this.controlsBar);_35.addMember(isc.LayoutSpacer.create({autoDraw:false,width:"*"}));_33.add(isc.VLayout.create({autoDraw:false,members:[_35,this.mainView]}))}else{_33.add(this.mainView)}}
this.children.add(isc.HLayout.create({autoDraw:false,width:"100%",height:"100%",members:_33}));this.eventEditorLayout.hide();this.setDateLabel()},isc.A.addEventOrUpdateEventFields=function isc_Calendar_addEventOrUpdateEventFields(){var _1=this,_2=_1.eventEditorLayout.event,_3=_1.eventEditor,_4=_1.getDateEditingStyle();if(_4=="date"||_4=="datetime"){var _5=_3.getValue(_1.startDateField),_6=_3.getValue(_1.endDateField),_7;if(_6<_5){_3.showItem("invalidDate");return false}
if(!_3.validate())return false;_1.eventEditorLayout.currentStart=_5;_1.eventEditorLayout.currentEnd=_6;_1.eventEditorLayout.hide();if(_1.isTimeline()&&_1.canEditLane){_7=_3.getValue(_1.laneNameField)}
if(_2){_1.updateEvent(_2,_5,_6,_3.getValue(_1.nameField),_3.getValue(_1.descriptionField),_3.getCustomValues(),true,_7)}else{_1.addEvent(_5,_6,_3.getValue(_1.nameField),_3.getValue(_1.descriptionField),_3.getCustomValues(),true)}}else if(_4=="time"){var _8=_3.getValue("startHours"),_9=_3.getValue("endHours"),_10=_3.getValue("startMinutes"),_11=_3.getValue("endMinutes"),_12,_13;if(!_1.twentyFourHourTime){_12=_3.getValue("startAMPM");_13=_3.getValue("endAMPM");_8=_1.$534(_8,_12);_9=_1.$534(_9,_13);if(_9==0)_9=24}
if(!(_8<_9||(_8==_9&&_10<_11))){_3.showItem("invalidDate");return false}
if(!_3.validate())return false;_1.eventEditorLayout.hide();var _14=_1.eventEditorLayout.currentStart,_15=_1.eventEditorLayout.currentEnd;if(_15.getDate()>_14.getDate()){if(_9==24)_9=0;else{_15.setDate(_14.getDate())}}
_14.setHours(_8);_14.setMinutes(_10);_15.setHours(_9);_15.setMinutes(_11);if(_2){var _16=_1.eventEditorLayout.originalStart,_17=_1.eventEditorLayout.originalEnd;_1.updateEvent(_2,_14,_15,_3.getValue(_1.nameField),_3.getValue(_1.descriptionField),_3.getCustomValues(),true);if(_1.eventAutoArrange){_1.$64n(_1.weekViewSelected(),_16,_17)}}else{_1.addEvent(_14,_15,_3.getValue(_1.nameField),_3.getValue(_1.descriptionField),_3.getCustomValues(),true)}}
return true},isc.A.setDateLabel=function isc_Calendar_setDateLabel(){if(!this.dateDisplay)return;if(this.dayViewSelected()){this.dateDisplay.setContents("<b>"+Date.getFormattedDateRangeString(this.chosenDate)+"</b>")}else if(this.weekViewSelected()){var _1=this.$656();var _2=_1[0];var _3=_1[1];this.dateDisplay.setContents("<b>"+Date.getFormattedDateRangeString(_2,_3)+"</b>")}else if(this.monthViewSelected()){this.dateDisplay.setContents("<b>"+this.chosenDate.getShortMonthName()+" "+this.chosenDate.getFullYear()+"</b>")}else if(this.timelineViewSelected()){var _4=this.timelineView,_5=_4.startDate,_6=_4.endDate;var _7="<b>"+_4.formatDateForDisplay(_5)+"</b> through <b>"+_4.formatDateForDisplay(_6)+"</b>";this.dateDisplay.setContents(_7)}},isc.A.$656=function isc_Calendar__getWeekRange(){var _1=this.chosenWeekStart.duplicate();var _2=this.chosenWeekEnd.duplicate();if(!this.showWeekends){var _3=Date.getWeekendDays();var _4=7-_3.length;while(_3.contains(_1.getDay())){_1.setDate(_1.getDate()+1)}
var _5=0,_6=_1.duplicate();for(var i=0;i<_4;i++){if(_3.contains(_6.getDay()))_5++;_6.setDate(_6.getDate()+1)}
_2=_1.duplicate();_2.setDate(_2.getDate()+(_4-1)+_5)}
return[_1,_2]},isc.A.dayViewSelected=function isc_Calendar_dayViewSelected(){if(this.mainView&&!this.mainView.isA("TabSet"))return this.mainView.viewName=="day";else return this.$567=="day"},isc.A.weekViewSelected=function isc_Calendar_weekViewSelected(){if(this.mainView&&!this.mainView.isA("TabSet"))return this.mainView.viewName=="week";else return this.$567=="week"},isc.A.monthViewSelected=function isc_Calendar_monthViewSelected(){if(this.mainView&&!this.mainView.isA("TabSet"))return this.mainView.viewName=="month";else return this.$567=="month"},isc.A.timelineViewSelected=function isc_Calendar_timelineViewSelected(){if(this.mainView&&!this.mainView.isA("TabSet"))return this.mainView.viewName=="timeline";else return this.$567=="timeline"},isc.A.$53l=function isc_Calendar__showEventDialog(_1,_2,_3,_4){if(!_4){this.eventDialog.event=null;if(this.eventEditorLayout)this.eventEditorLayout.event=null;this.eventDialog.items[0].createFields(false);var _5,_6;_5=this.$53m(_1,_2);if(this.monthViewSelected()){var _7=new Date();_7=_7.getHours();if(_7>22)_7-=1;_5.setHours(_7)}
if(_3&&_3>1){_6=this.$53m(_1+_3,_2)}
this.eventDialog.setDate(_5,_6)}else{this.eventDialog.eventWindow=_4;this.eventDialog.items[0].createFields(true);this.eventDialog.setEvent(_4.event)}
this.eventDialog.moveTo(0,-10000);this.eventDialog.show();var _8=this.getSelectedView().getCellPageRect(_1,_2);this.eventDialog.placeNear(_8[0],_8[1]);isc.Timer.setTimeout(this.ID+".eventDialog.bringToFront()")},isc.A.$53j=function isc_Calendar__showEventEditor(_1){if(!this.eventEditorLayout.isDrawn())this.eventEditorLayout.draw();this.eventEditorLayout.setWidth(this.mainView.getVisibleWidth());this.eventEditorLayout.setHeight(this.mainView.getVisibleHeight());this.eventEditorLayout.setPageLeft(this.mainView.getPageLeft());this.eventEditorLayout.setPageTop(this.getPageTop());if(_1){this.eventEditorLayout.setEvent(_1)}else{this.eventEditor.clearValues();if(this.eventEditorFields){this.eventEditorLayout.items[0].setCustomValues(this.eventDialog.items[0].getCustomValues())}
var _2=this.eventDialog.items[0].getValue(this.nameField);this.eventEditorLayout.setDate(this.eventDialog.currentStart,this.eventDialog.currentEnd,_2)}
this.eventDialog.hide();this.eventEditorLayout.show()},isc.A.$53k=function isc_Calendar__getEventDialogTitle(_1,_2){var _3=Date.getShortDayNames(),_4=Date.getShortMonthNames(),_5=isc.Time.toTime(_1,this.timeFormatter,true),_6=isc.Time.toTime(_2,this.timeFormatter,true),_7;if(this.isTimeline()){var _8=_1.getDay()!=_2.getDay();if(_8){_7=_3[_1.getDay()]+", "+_4[_1.getMonth()]+" "+_1.getDate()+", "+_5+" - "+_3[_2.getDay()]+", "+_4[_2.getMonth()]+" "+_2.getDate()+", "+_6;return _7}}
var _9=_5+" - "+_6;return _3[_1.getDay()]+", "+_4[_1.getMonth()]+" "+_1.getDate()+", "+_9},isc.A.$53n=function isc_Calendar__to12HrNotation(_1){if(_1==0)return 12;else if(_1<13)return _1;else return _1-12},isc.A.$534=function isc_Calendar__to24HourNotation(_1,_2){_1=parseInt(_1);if(_2.toLowerCase()=="am"&&_1==12){return 0}else if(_2.toLowerCase()=="pm"&&_1<12){return _1+12}else{return _1}},isc.A.$53m=function isc_Calendar__getDateFromPoint(_1,_2){var _3;if(this.dayViewSelected()){_3=this.chosenDate.duplicate()}else if(this.weekViewSelected()){var _4=this.weekView.getField(_2);if(!_4.$66a)return;_3=new Date(_4.$66a,_4.$659,_4.$658)}else if(this.monthViewSelected()){var _5=this.monthView.data.get(_1);var _6=this.monthView.getField(_2).$66b;_3=_5["date"+_6].duplicate();_3.setHours(0);_3.setMinutes(0);_3.setSeconds(0)}else if(this.timelineViewSelected()){var _7=this.timelineView;_3=this.startDate.duplicate();if(_7.timelineGranularity=="day"){_3.setDate(_3.getDate()+_2)}else{_3.setHours(_3.getHours()+_2)}}else{return}
if(this.dayViewSelected()||this.weekViewSelected()){var _8,_9=_1,_10=0;if(_1%2==1){_9=_1-1;_10=30}
_3.setHours(_9/2,_10)}
return _3},isc.A.$54g=function isc_Calendar__getMinutePixels(_1,_2,_3){if(_3=="timeline"){var _4=_2;return Math.round(_4/60)*_1}else{return Math.round((_2/30)*_1)}},isc.A.monthViewEventClick=function isc_Calendar_monthViewEventClick(_1,_2,_3){var _4=this.monthView.getEvents(_1,_2);var _5=_4[_3];if(this.eventClick(_5,"month"))this.$53j(_5)},isc.A.getDayBodyHTML=function isc_Calendar_getDayBodyHTML(_1,_2,_3,_4,_5){var _6=_1.getDay();var _7=_2,_8=15,_9=this.monthView.data?this.monthView.data[1]:null,_10=this.monthView.getRowHeight(_9,1);var _11="";for(var i=0;i<_7.length;i++){var _13=isc.Time.toTime(_7[i][this.startDateField],this.timeFormatter,true)+" ";if(this.canEditEvent(_7[i])){var _14="<a href='javascript:"+this.ID+".monthViewEventClick("+_4+","+_5+","+i+");' class='"+this.calMonthEventLinkStyle+"'>";_11+=_14+_13+_7[i][this.nameField]+"</a><br/>"}else{_11+=_13+_7[i][this.nameField]+"<br/>"}
if((i+3)*_8>_10)break}
if(i<_7.length-1){_11+="+ "+(_7.length-1-i)+" more..."}
return _11},isc.A.getDayHeaderHTML=function isc_Calendar_getDayHeaderHTML(_1,_2,_3,_4,_5){return _1.getDate()},isc.A.dayBodyClick=function isc_Calendar_dayBodyClick(_1,_2,_3,_4,_5){return true},isc.A.dayHeaderClick=function isc_Calendar_dayHeaderClick(_1,_2,_3,_4,_5){return true},isc.A.eventClick=function isc_Calendar_eventClick(){return true},isc.A.eventRemoveClick=function isc_Calendar_eventRemoveClick(){return true},isc.A.eventMoved=function isc_Calendar_eventMoved(){return true},isc.A.eventResized=function isc_Calendar_eventResized(){return true},isc.A.timelineEventMoved=function isc_Calendar_timelineEventMoved(){return true},isc.A.timelineEventResized=function isc_Calendar_timelineEventResized(){return true},isc.A.getValidSnapDate=function isc_Calendar_getValidSnapDate(_1,_2){var _3=this.eventSnapGap;var _4=((_1.getHours()*60)+_1.getMinutes())%_3;var _5=(_2.getHours()*60)+_2.getMinutes();var _6=Math.round((_5-_4)/_3);var _7=(_6*_3)+_4;var _8=Math.floor(_7/60),_9=_7%60;_2.setHours(_8);_2.setMinutes(_9);return _2},isc.A.selectTab=function isc_Calendar_selectTab(_1){if(this.mainView&&this.mainView.isA("TabSet")&&this.mainView.tabs.getLength()>_1){this.mainView.selectTab(_1);this.refreshSelectedView();return true}else{return false}},isc.A.parentResized=function isc_Calendar_parentResized(){this.Super('parentResized',arguments);if(this.eventEditorLayout.isVisible())this.eventEditorLayout.sizeMe()},isc.A.dateChanged=function isc_Calendar_dateChanged(){return true},isc.A.getActiveDay=function isc_Calendar_getActiveDay(){var _1=this.getActiveTime();if(_1)return _1.getDay()},isc.A.getActiveTime=function isc_Calendar_getActiveTime(){var _1=this.ns.EH,_2=this.getSelectedView();var _3=_2.getEventColumn();var _4=_2.getEventRow();return this.$53m(_4,_3)},isc.A.setTimelineRange=function isc_Calendar_setTimelineRange(_1,_2,_3,_4,_5){if(this.timelineView)this.timelineView.setTimelineRange(_1,_2,_3,_4);if(_5)this.fireCallback(_5)},isc.A.getEventLength=function isc_Calendar_getEventLength(_1,_2){var _3=(_2.getTime()-_1.getTime())/(1000*60);return _3});isc.B._maxIndex=isc.C+93;isc.ClassFactory.defineClass("DaySchedule","ListGrid");isc.DaySchedule.changeDefaults("bodyProperties",{childrenSnapToGrid:true,snapToCells:true,redrawOnResize:true});isc.A=isc.DaySchedule.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoDraw=false;isc.A.canSort=false;isc.A.canResizeFields=false;isc.A.canReorderFields=false;isc.A.showHeader=false;isc.A.showHeaderContextMenu=false;isc.A.showAllRecords=true;isc.A.fixedRecordHeights=true;isc.A.labelColumnWidth=60;isc.A.labelColumnAlign="right";isc.A.showLabelColumn=true;isc.A.labelColumnPosition="left";isc.A.labelColumnBaseStyle="labelColumn";isc.A.showRollOver=true;isc.A.useCellRollOvers=true;isc.A.canAutoFitFields=false;isc.A.canSelectCells=true;isc.B.push(isc.A.initWidget=function isc_DaySchedule_initWidget(){this.fields=[];var _1=this.creator;if(_1.labelColumnWidth&&_1.labelColumnWidth!=this.labelColumnWidth){this.labelColumnWidth=_1.labelColumnWidth}
this.eventDragGap=_1.eventDragGap;var _2={width:this.labelColumnWidth,name:"label",title:" ",cellAlign:"right",formatCellValue:function(_10,_11,_12,_13,_14){if(_12%2==0){var _3=(_12/2);var _4=isc.Time.parseInput(_3);return isc.Time.toTime(_4,_14.creator.timeFormatter,true)}
else{return""}}}
if(this.showLabelColumn&&this.labelColumnPosition=="left"){this.fields.add(_2)}
this.fields.add({name:"day1",align:"center"});if(this.$53i){var _5=8;for(var i=2;i<_5;i++){this.fields.add({name:"day"+i,align:"center"})}
this.showHeader=true}
if(this.$53i&&!this.creator.showWeekends){var _7=this.showLabelColumn&&this.labelColumnPosition=="left"?1:0;var _8=Date.getWeekendDays();for(var i=_7;i<this.fields.length;i++){var _9=((i-_7)+this.creator.firstDayOfWeek)%7;if(_8.contains(_9)){this.fields[i].showIf="return false;"}}}
if(this.showLabelColumn&&this.labelColumnPosition=="right"){this.fields.add(_2)}
this.data=isc.DaySchedule.$53o;this.Super("initWidget")},isc.A.draw=function isc_DaySchedule_draw(_1,_2,_3,_4){this.invokeSuper(isc.DaySchedule,"draw",_1,_2,_3,_4);this.logDebug('draw','calendar');this.refreshEvents();this.setSnapGap();if(this.creator.scrollToWorkday)this.scrollToWorkdayStart()},isc.A.setSnapGap=function isc_DaySchedule_setSnapGap(){var _1=this.creator.eventSnapGap;this.body.snapVGap=Math.round((_1/30)*this.body.getRowSize(0));this.body.snapHGap=null},isc.A.scrollToWorkdayStart=function isc_DaySchedule_scrollToWorkdayStart(){var _1=isc.Time.parseInput(this.creator.workdayStart);var _2=_1.getHours()*2;if(_1.getMinutes()>0)_2++;var _3=this.getRowHeight(null,0)*_2;this.body.scrollTo(0,_3)},isc.A.getRowHeight=function isc_DaySchedule_getRowHeight(_1,_2){if(this.creator.scrollToWorkday){var _3=isc.Time.parseInput(this.creator.workdayEnd).getHours()
-isc.Time.parseInput(this.creator.workdayStart).getHours();if(_3<=0)return this.cellHeight;var _4=Math.floor(this.body.getViewportHeight()/(_3*2));return _4<this.cellHeight?this.cellHeight:_4}else{return this.cellHeight}},isc.A.getDayFromCol=function isc_DaySchedule_getDayFromCol(_1){var _2=this.fields.get(_1).$654;return _2},isc.A.getDateFromCol=function isc_DaySchedule_getDateFromCol(_1){var _2=this.fields.get(_1);var _3=new Date(_2.$66a,_2.$659,_2.$658);return _3},isc.A.isLabelCol=function isc_DaySchedule_isLabelCol(_1){if(_1==0&&this.showLabelColumn&&this.labelColumnPosition=="left"){return true}else if(_1==this.fields.length-1&&this.showLabelColumn&&this.labelColumnPosition=="right"){return true}else{return false}},isc.A.colDisabled=function isc_DaySchedule_colDisabled(_1){var _2=this.$53i?this.getDayFromCol(_1):this.creator.chosenDate.getDay();if(this.creator.disableWeekends&&Date.getWeekendDays().contains(_2)){return true}else{return false}},isc.A.refreshStyle=function isc_DaySchedule_refreshStyle(){if(!this.body)return;for(var i=0;i<this.data.length;i++){this.body.refreshCellStyle(i,1)}},isc.A.headerClick=function isc_DaySchedule_headerClick(_1,_2){if(this.isLabelCol(_1))return true;var _3=this.getField(_1);var _4=this.creator;_4.dateChooser.dateClick(_3.$66a,_3.$659,_3.$658);_4.selectTab(0);return true},isc.A.getCellAlign=function isc_DaySchedule_getCellAlign(_1,_2,_3){return this.labelColumnAlign},isc.A.cellMouseDown=function isc_DaySchedule_cellMouseDown(_1,_2,_3){if(this.isLabelCol(_3)||this.colDisabled(_3))return true;var _4=this.creator.$53m(this.getEventRow(),this.getEventColumn());if(this.creator.backgroundMouseDown&&this.creator.backgroundMouseDown(_4)==false)return;if(!this.creator.canCreateEvents)return true;this.clearSelection();this.$53q={};this.$53q.colNum=_3;this.$53q.startRowNum=_2;this.$53q.endRowNum=_2;this.$53r=true;this.refreshCellStyle(_2,_3)},isc.A.cellOver=function isc_DaySchedule_cellOver(_1,_2,_3){if(this.$53r&&this.$53q){var _4;if(this.$53q.startRowNum<this.$53q.endRowNum){if(_2>this.$53q.endRowNum){_4=_2}else{_4=this.$53q.endRowNum}
this.$53q.endRowNum=_2}else{if(_2<this.$53q.endRowNum){_4=_2}else{_4=this.$53q.endRowNum}
this.$53q.endRowNum=_2}
var _5=6;var _3=this.$53q.colNum;for(var i=_4-_5;i<_4+_5;i++){if(i>=0&&i<=47)this.refreshCellStyle(i,_3)}}},isc.A.cellMouseUp=function isc_DaySchedule_cellMouseUp(_1,_2,_3){if(!this.$53q)return true;this.$53r=false;var _4,_5,_6;if(this.$53q.startRowNum>this.$53q.endRowNum){_4=this.$53q.endRowNum;_5=this.$53q.startRowNum}else{_5=this.$53q.endRowNum;_4=this.$53q.startRowNum}
_6=_5-_4+1;if(this.creator.backgroundClick){var _7=this.creator.$53m(_4,_3);var _8=this.creator.$53m(_4+_6,_3);if(this.creator.backgroundClick(_7,_8)==false){this.clearSelection();return}}
this.creator.$53l(_4,this.$53q.colNum,_6)},isc.A.getCellStyle=function isc_DaySchedule_getCellStyle(_1,_2,_3){var _4=this.getBaseStyle(_1,_2,_3);if(this.isLabelCol(_3))return _4;if(this.colDisabled(_3))return this.baseStyle+"Disabled";if(this.$53q&&this.$53q.colNum==_3){var _5=this.$53q.startRowNum,_6=this.$53q.endRowNum;if(_2>=_5&&_2<=_6||_2>=_6&&_2<=_5){return this.creator.selectedCellStyle}else{return _4}}else{return _4}},isc.A.getBaseStyle=function isc_DaySchedule_getBaseStyle(_1,_2,_3){if(this.isLabelCol(_3))return this.labelColumnBaseStyle;var _4=this.$53i?this.getDayFromCol(_3):this.creator.chosenDate.getDay();var _5=this.$53i?this.getDateFromCol(_3):this.creator.chosenDate.duplicate(),_6=_5.duplicate(),_7=_5.duplicate(),_8=isc.Time.parseInput(this.creator.workdayStart),_9=isc.Time.parseInput(this.creator.workdayEnd);_5.setHours(_8.getHours());_5.setMinutes(_8.getMinutes());_6.setHours(_9.getHours());_6.setMinutes(_9.getMinutes());_7.setHours(Math.floor(_2/2));if(_2%2==1)_7.setMinutes(30);else _7.setMinutes(0);var _10=this.creator.dateIsWorkday(_7);_7=_7.getTime();if(this.creator.showWorkday&&_5.getTime()<=_7&&_7<_6.getTime()&&_10){return this.creator.workdayBaseStyle}else{return this.baseStyle}},isc.A.clearSelection=function isc_DaySchedule_clearSelection(){if(this.$53q){var _1,_2,_3=this.$53q.colNum;if(this.$53q.startRowNum<this.$53q.endRowNum){_1=this.$53q.startRowNum;_2=this.$53q.endRowNum}else{_1=this.$53q.endRowNum;_2=this.$53q.startRowNum}
this.$53q=null;for(var i=_1;i<_2+1;i++){this.refreshCellStyle(i,_3)}}},isc.A.refreshEvents=function isc_DaySchedule_refreshEvents(){if(!this.body||!this.creator.hasData())return;this.logDebug('refreshEvents:'+this.viewName,"calendar");this.clearEvents();var _1,_2,_3=this.creator;if(this.$53i){_1=_3.chosenWeekStart;_2=_3.chosenWeekEnd}else{_1=new Date(_3.year,_3.month,_3.chosenDate.getDate(),0,0);_2=new Date(_3.year,_3.month,_3.chosenDate.getDate(),23,59)}
var _4=_3.$53g(_1,_2);for(var i=0;i<_4.length;i++){this.addEvent(_4[i])}
if(_3.eventsRendered&&isc.isA.Function(_3.eventsRendered))
_3.eventsRendered()},isc.A.sizeEventWindow=function isc_DaySchedule_sizeEventWindow(_1){var _2=this.creator,_3=_1.event;if(Array.isLoading(_3))return;if(!_1.$53v){if(_2.eventAutoArrange){_2.$64n(_1.$53i,_3[_2.startDateField],_3[_2.endDateField])}else{var _4=(_1.$53i?_2.weekView:_2.dayView);var _5=_4.getRowHeight(1),_6=_4.getColumnWidth(_4.isLabelCol(0)?1:0);var _7=_3[_2.endDateField].getHours()==0?24:_3[_2.endDateField].getHours();var _8=false;if(_3[_2.endDateField].getDate()>_3[_2.startDateField].getDate()){_8=true;_7=24}
var _9=(_7-_3[_2.startDateField].getHours())*(_5*2),_10=_6;if(_2.weekEventBorderOverlap&&_1.$53i)_10+=1;if(_3[_2.startDateField].getMinutes()>0){_9-=_2.$54g(_3[_2.startDateField].getMinutes(),_5)}
if(_3[_2.endDateField].getMinutes()>0&&!_8){_9+=_2.$54g(_3[_2.endDateField].getMinutes(),_5)}
var _11=_3[_2.startDateField].getHours()*(_5*2);if(_3[_2.startDateField].getMinutes()>0){_11+=_2.$54g(_3[_2.startDateField].getMinutes(),_5)}
var _12=_2.getEventLeft(_3,_1.$53i);_1.renderEvent(_11,_12,_10,_9)}}else{_1.$53v=false}},isc.A.clearEvents=function isc_DaySchedule_clearEvents(){if(!this.body||!this.body.children)return;var _1=this.body.children;for(var i=_1.length-1;i>=0;i--){if(isc.isAn.EventWindow(_1[i]))this.body.removeChild(_1[i])}},isc.A.addEvent=function isc_DaySchedule_addEvent(_1){this.clearSelection();var _2=this.creator.$53f(_1);_2.$643=this;if(this.$53i)_2.$53i=true;if(this.body)this.body.addChild(_2);this.sizeEventWindow(_2)},isc.A.removeEvent=function isc_DaySchedule_removeEvent(_1){var _2=this.body.children;for(var i=0;i<_2.length;i++){if(isc.isAn.EventWindow(_2[i])&&_2[i].event===_1){var _4=_2[i];_4.parentElement.removeChild(_4);_4.destroy();return true}}
return false},isc.A.updateEventWindow=function isc_DaySchedule_updateEventWindow(_1){if(!this.body||!this.body.children)return;var _2=this.body.children,_3=this.creator;if(_3.dataSource)_3.$53s=_3.getDataSource().getLocalPrimaryKeyFields();for(var i=0;i<_2.length;i++){if(isc.isAn.EventWindow(_2[i])&&this.areSame(_2[i].event,_1)){_2[i].event=_1;this.sizeEventWindow(_2[i]);_2[i].setDescriptionText(_1[_3.descriptionField]);return true}}
return false},isc.A.areSame=function isc_DaySchedule_areSame(_1,_2){var _3=this.creator;if(_3.dataSource){var _4=_3.$53s,_5=true;for(var _6 in _4){if(_1[_6]!=_2[_6]){_5=false;break}}
return _5}else{return(_1===_2)}});isc.B._maxIndex=isc.C+25;isc.ClassFactory.defineClass("WeekSchedule","DaySchedule");isc.ClassFactory.defineClass("MonthSchedule","ListGrid");isc.ClassFactory.defineClass("MonthScheduleBody","GridBody");isc.MonthSchedule.changeDefaults("headerButtonProperties",{showRollOver:false,showDown:false,cursor:"default"});isc.MonthSchedule.changeDefaults("bodyProperties",{redrawOnResize:true});isc.A=isc.MonthSchedule.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoDraw=false;isc.A.leaveScrollbarGap=false;isc.A.showAllRecords=true;isc.A.fixedRecordHeights=true;isc.A.showHeader=true;isc.A.showHeaderContextMenu=false;isc.A.canSort=false;isc.A.canResizeFields=false;isc.A.canReorderFields=false;isc.A.canAutoFitFields=false;isc.A.canHover=true;isc.A.showHover=true;isc.A.hoverWrap=false;isc.A.showRollOver=true;isc.A.useCellRollOvers=true;isc.A.canSelectCells=true;isc.A.firstDayOfWeek=0;isc.A.dayHeaderHeight=20;isc.A.mimimumDayHeight=80;isc.A.alternateRecordStyles=false;isc.B.push(isc.A.initWidget=function isc_MonthSchedule_initWidget(){if(this.creator.data)this.data=this.getDayArray();this.fields=[{name:"day1",align:"center"},{name:"day2",align:"center"},{name:"day3",align:"center"},{name:"day4",align:"center"},{name:"day5",align:"center"},{name:"day6",align:"center"},{name:"day7",align:"center"}];this.firstDayOfWeek=this.creator.firstDayOfWeek;var _1=Date.getShortDayNames();var _2=Date.getWeekendDays();for(var i=0;i<7;i++){var _4=(i+this.firstDayOfWeek)%7;this.fields[i].title=_1[_4];this.fields[i].$654=_4;this.fields[i].$66b=i+1;if(!this.creator.showWeekends&&_2.contains(_4)){this.fields[i].showIf="return false;"}}
this.Super("initWidget")},isc.A.getDayArray=function isc_MonthSchedule_getDayArray(){var _1=[],_2,_3,_4=new Date(this.creator.year,this.creator.month,1);while(_4.getDay()!=this.creator.firstDayOfWeek){this.incrementDate(_4,-1)}
if(!this.creator.showWeekends){var _5=Date.getWeekendDays();var _6=_4.duplicate();var _7=true;for(var i=0;i<=7-_5.length;i++){if(_6.getMonth()==this.creator.month){_7=false;break}
this.incrementDate(_6,1)}
if(_7)this.incrementDate(_4,7)}
_3=new Date(this.creator.year,this.creator.month,_4.getDate()+40);_2=this.creator.$53g(_4,_3);_2.sortByProperty("name",true,function(_9,_10,_11){return _9[_11.startDateField].getTime()},this.creator);this.$53t=0;for(var i=0;i<6;i++){if(this.creator.showDayHeaders)_1.add(this.getHeaderRowObject(_4));_1.add(this.getEventRowObject(_4,_2));this.incrementDate(_4,7);if(_4.getMonth()!=this.creator.month)break}
return _1},isc.A.getHeaderRowObject=function isc_MonthSchedule_getHeaderRowObject(_1){var _2={};var _3=_1.duplicate();for(var i=0;i<7;i++){_2["day"+(i+1)]=_3.getDate();_2["date"+(i+1)]=_3.duplicate();this.incrementDate(_3,1)}
return _2},isc.A.incrementDate=function isc_MonthSchedule_incrementDate(_1,_2){var _3=_1.getDate();_1.setDate(_3+_2);if(_1.getDate()==(_3+_2)-1){_1.setHours(_1.getHours()+1);_1.setDate(_3+_2)}
return _1},isc.A.getEventRowObject=function isc_MonthSchedule_getEventRowObject(_1,_2){var _3={};var _4=_1.duplicate();for(var i=0;i<7;i++){var _6=[];while(this.$53t<_2.length){var _7=_2[this.$53t];if(_7[this.creator.startDateField].getMonth()!=_4.getMonth()||_7[this.creator.startDateField].getDate()!=_4.getDate()){break}else{_6.add(_7);this.$53t+=1}}
_3["day"+(i+1)]=_4.getDate();_3["date"+(i+1)]=_4.duplicate();_3["event"+(i+1)]=_6;this.incrementDate(_4,1)}
return _3},isc.A.getEvents=function isc_MonthSchedule_getEvents(_1,_2){var _3=this.getDayFromCol(_2);var _4=this.fields.get(_2).$66b
var _5=this.data[_1]["event"+_4];return _5},isc.A.getEventCell=function isc_MonthSchedule_getEventCell(_1){var _2=this.data;for(var _3=0;_3<this.fields.length;_3++){var _4=this.fields[_3].$66b,_5="event"+_4;for(var _6=0;_6<_2.length;_6++){var _7=_2.get(_6)[_5];if(_7!=null&&_7.contains(_1)){return[_6,_3]}}}},isc.A.getDayFromCol=function isc_MonthSchedule_getDayFromCol(_1){var _2=this.fields.get(_1).$654;return _2},isc.A.colDisabled=function isc_MonthSchedule_colDisabled(_1){if(this.creator.disableWeekends&&Date.getWeekendDays().contains(this.getDayFromCol(_1))){return true}else{return false}},isc.A.refreshEvents=function isc_MonthSchedule_refreshEvents(){if(!this.creator.hasData())return;this.logDebug('refreshEvents: month','calendar');this.setData(this.getDayArray());var _1=this.creator;if(_1.eventsRendered&&isc.isA.Function(_1.eventsRendered))
_1.eventsRendered()},isc.A.rowIsHeader=function isc_MonthSchedule_rowIsHeader(_1){var _2=this.creator;if(!_2.showDayHeaders||(_2.showDayHeaders&&_1%2==1))return false;else return true},isc.A.formatCellValue=function isc_MonthSchedule_formatCellValue(_1,_2,_3,_4){var _5=this.creator,_6=this.fields.get(_4).$66b,_7=_2["event"+_6],_8=_2["date"+_6],_9=_8.getMonth()!=_5.chosenDate.getMonth();if(this.rowIsHeader(_3)){if(!_5.showOtherDays&&_9){return""}else{return _5.getDayHeaderHTML(_8,_7,_5,_3,_4)}}else{if(!_5.showOtherDays&&_9){return""}else{return _5.getDayBodyHTML(_8,_7,_5,_3,_4)}}},isc.A.getRowHeight=function isc_MonthSchedule_getRowHeight(_1,_2){var _3=this.creator.showDayHeaders;if(this.rowIsHeader(_2)){return this.dayHeaderHeight}else{var _4=_3?this.data.length/2:this.data.length,_5=_3?this.body.getViewportHeight()
-(this.dayHeaderHeight*_4):this.body.getViewportHeight(),_6=_3?this.mimimumDayHeight-this.dayHeaderHeight:this.minimumDayHeight;if(_5/_4<=_6){return _6}else{var _7=_5%_4,_8=0,_9=_3?(_2-1)/2:_2;if(_9<_7)_8=1;return(Math.floor(_5/_4)+_8)}}},isc.A.getCellAlign=function isc_MonthSchedule_getCellAlign(_1,_2,_3){if(this.rowIsHeader(_2))return"right"
else return"left"},isc.A.getCellVAlign=function isc_MonthSchedule_getCellVAlign(_1,_2,_3){if(!this.rowIsHeader(_2))return"top";else return"center"},isc.A.cellHoverHTML=function isc_MonthSchedule_cellHoverHTML(_1,_2,_3){var _4=this.fields.get(_3).$66b;if(!this.rowIsHeader(_2)&&_1["event"+_4]!=null){var _5=_1["event"+_4];var _6="";for(var i=0;i<_5.length;i++){var _8=isc.Time.toTime(_5[i][this.creator.startDateField],this.creator.timeFormatter,true);_6+=_8+" "+_5[i][this.creator.nameField]+"<br/>"}
return _6}},isc.A.getBaseStyle=function isc_MonthSchedule_getBaseStyle(_1,_2,_3){var _4=this.creator,_5=this.fields.get(_3).$66b;var _6;if(this.rowIsHeader(_2)){if((_2==0&&_1["day"+_5]>7)||(_2==this.data.length-2&&_1["day"+_5]<7)){if(!_4.showOtherDays)return _4.otherDayBlankStyle;else _6=_4.otherDayHeaderBaseStyle}else _6=_4.dayHeaderBaseStyle}else{var _7=this.colDisabled(_3),_8=_4.showDayHeaders?1:0,_9=this.data.length-1;if((_2==_8&&this.data[_8]["day"+_5]>7)||(_2==_9&&this.data[_9]["day"+_5]<7)){if(!_4.showOtherDays)return _4.otherDayBlankStyle;else _6=_7?_4.otherDayBodyBaseStyle+"Disabled":_4.otherDayBodyBaseStyle}else _6=_7?_4.dayBodyBaseStyle+"Disabled":_4.dayBodyBaseStyle}
return _6},isc.A.cellClick=function isc_MonthSchedule_cellClick(_1,_2,_3){var _4=this.creator,_5,_6,_7=this.fields.get(_3).$66b,_8=_1["date"+_7],_9=_1["event"+_7],_10=_4.chosenDate.getMonth()!=_8.getMonth(),_11=false;if(this.rowIsHeader(_2)){if(!(!this.creator.showOtherDays&&_10)){_11=_4.dayHeaderClick(_8,_9,_4,_2,_3)}
if(_11){if(_2==0&&_1["day"+_7]>7){if(_4.month==0){_5=_4.year-1;_6=11}else{_5=_4.year;_6=_4.month-1}}else if(_2==this.data.length-2&&_1["day"+_7]<7){if(_4.month==11){_5=_4.year+1;_6=0}else{_5=_4.year;_6=_4.month+1}}else{_5=_4.year;_6=_4.month}
_4.dateChooser.dateClick(_5,_6,_1["day"+_7]);_4.selectTab(0)}}else{if(!this.colDisabled(_3)&&!(!_4.showOtherDays&&_10)){_11=_4.dayBodyClick(_8,_9,_4,_2,_3);if(_11&&_4.canCreateEvents){_4.$53l(_2,_3)}}}});isc.B._maxIndex=isc.C+18;isc.ClassFactory.defineClass("EventWindow","Window");isc.EventWindow.changeDefaults("resizerDefaults",{overflow:"hidden",height:6,snapTo:"B",canDragResize:true})
isc.EventWindow.changeDefaults("headerDefaults",{layoutMargin:0,layoutLeftMargin:3,layoutRightMargin:3})
isc.A=isc.EventWindow.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoDraw=false;isc.A.minHeight=5;isc.A.minWidth=5;isc.A.showHover=true;isc.A.canHover=true;isc.A.hoverWidth=200;isc.A.showHeaderIcon=false;isc.A.showMinimizeButton=false;isc.A.showMaximimumButton=false;isc.A.canDragResize=true;isc.A.canDragReposition=true;isc.A.resizeFrom=["B"];isc.A.showShadow=false;isc.A.showEdges=false;isc.A.showHeaderBackground=false;isc.A.useBackMask=false;isc.A.keepInParentRect=true;isc.A.headerProperties={height:14};isc.A.closeButtonProperties={height:10,width:10};isc.A.bodyColor=null;isc.A.showFooter=true;isc.A.baseStyle="eventWindow";isc.A.footerProperties={overflow:"hidden",defaultLayoutAlign:"center",height:7};isc.A.bodyConstructor=isc.HTMLFlow;isc.B.push(isc.A.initWidget=function isc_EventWindow_initWidget(){this.bodyStyle=this.baseStyle+"Body";this.headerStyle=this.baseStyle+"Header";if(this.calendar.showEventDescriptions!=false){this.bodyProperties={contents:this.descriptionText,valign:"top",overflow:"hidden"}}
if(this.calendar.showEventBody==false){this.showBody=false;this.showTitle=false}
this.headerLabelProperties={styleName:this.className+"Header"};this.Super("initWidget",arguments)},isc.A.makeFooter=function isc_EventWindow_makeFooter(){if(!this.showFooter||this.canDragResize==false)return;this.resizer=this.createAutoChild("resizer",{dragTarget:this,styleName:this.baseStyle+"Resizer"});this.addChild(this.resizer);if(this.resizer)this.resizer.bringToFront()},isc.A.setDescriptionText=function isc_EventWindow_setDescriptionText(_1){if(this.calendar.getDescriptionText){_1=this.calendar.getDescriptionText(this.event)}
if(_1){if(this.body){this.descriptionText=_1;this.body.setContents(_1)}else{this.descriptionText=_1;if(this.$734){this.$734.setWidth("100%");this.$734.setContents(_1)}}}},isc.A.click=function isc_EventWindow_click(){if(this.$53u)return;if(this.$67e){this.$67e=null;return}
var _1=this.calendar;var _2=_1.eventClick(this.event,this.$53i?"week":"day");if(_2){if(!_1.canEditEvent(this.event))return;if(this.$53i)_1.weekView.clearSelection();else if(_1.dayView)_1.dayView.clearSelection();var _3=(this.$53i&&_1.weekView.isLabelCol(0)?1:0);var _4=this.$53i?this.event[_1.startDateField].getDay()-
_1.firstDayOfWeek+_3:_3;if(this.$53i&&_1.showWeekends==false)_4--;var _5=this.event[_1.startDateField].getHours()*2;_1.$53l(_5,_4,null,this)}},isc.A.mouseDown=function isc_EventWindow_mouseDown(){this.calendar.eventDialog.hide();return isc.EH.STOP_BUBBLING},isc.A.renderEvent=function isc_EventWindow_renderEvent(_1,_2,_3,_4){var _5=this.calendar,_6=this.event;if(isc.isA.Number(_3)&&isc.isA.Number(_4)){this.resizeTo(Math.round(_3),Math.round(_4))}
if(isc.isA.Number(_1)&&isc.isA.Number(_2)){this.moveTo(Math.round(_2),Math.round(_1))}
var _7=isc.Time.toTime(_6[_5.startDateField],this.calendar.timeFormatter,true);var _8=_7+" "+_6[_5.nameField];this.setTitle(_8);this.bringToFront()},isc.A.getHoverHTML=function isc_EventWindow_getHoverHTML(){return this.calendar.getEventHoverHTML(this.event,this)},isc.A.closeClick=function isc_EventWindow_closeClick(){var _1=this.calendar;if(_1.eventRemoveClick(this.event)==false){this.$67e=true;return}
this.Super("closeClick",arguments);this.calendar.removeEvent(this.event,true);this.$53u=true},isc.A.parentResized=function isc_EventWindow_parentResized(){this.Super('parentResized',arguments);this.$643.sizeEventWindow(this)},isc.A.getEventLength=function isc_EventWindow_getEventLength(_1,_2){return this.calendar.getEventLength(_1||this.event[this.calendar.startDateField],_2||this.event[this.calendar.endDateField])},isc.A.dragRepositionStart=function isc_EventWindow_dragRepositionStart(){var _1=this.getTop()%this.parentElement.snapVGap;this.parentElement.VSnapOrigin=_1},isc.A.dragRepositionStop=function isc_EventWindow_dragRepositionStop(){var _1=this.calendar;var _2=this.event[_1.startDateField],_3=this.event[_1.endDateField];this.Super('dragRepositionStop',arguments);var _4=this.ns.EH,_5=this.parentElement.getEventColumn(),_6=(_4.dragMoveTarget.getTop()-this.parentElement.getPageTop())+this.parentElement.getScrollTop(),_7=this.parentElement.getRowSize(1),_8=Math.floor(_6/_7),_9=(this.$53i?_1.weekView:_1.dayView);if(_9.isLabelCol(_5)||_9.colDisabled(_5))return false;var _10=_1.$53m(_8,_5);var _11=Math.floor((_6-(_7*_8))*(30/_7));_10.setMinutes(_10.getMinutes()+_11);_10=_1.getValidSnapDate(this.event[_1.startDateField],_10);if(!_1.eventMoved(_10,this.event))return false;var _12=new Date(_10.getFullYear(),_10.getMonth(),_10.getDate(),_10.getHours(),_10.getMinutes());_12.setMinutes(_12.getMinutes()+this.getEventLength());_1.updateEvent(this.event,_10,_12,this.event[_1.nameField],this.event[_1.descriptionField],null,true);if(_1.eventAutoArrange){_1.$64n(this.$53i,_2,_3);_4.dragMoveTarget.setPageRect(this.getPageLeft(),this.getPageTop())}
return true},isc.A.dragResizeStart=function isc_EventWindow_dragResizeStart(){var _1=(this.getTop()+this.getVisibleHeight())%this.parentElement.snapVGap;this.parentElement.VSnapOrigin=_1},isc.A.dragResizeStop=function isc_EventWindow_dragResizeStop(){var _1=this.calendar;var _2=this.event[_1.startDateField],_3=this.event[_1.endDateField];this.Super('dragResizeStop',arguments);var _4=this.ns.EH,_5=this.parentElement.getEventColumn(),_6=(_4.dragMoveTarget.getTop()-this.parentElement.getPageTop())+this.parentElement.getScrollTop()+_4.dragMoveTarget.getVisibleHeight(),_7=this.parentElement.getRowSize(1),_8=Math.floor(_6/_7);var _9=_1.$53m(_8,_5);var _10=Math.floor((_6-(_7*_8))*(30/_7));_9.setMinutes(_9.getMinutes()+_10);_9=_1.getValidSnapDate(this.event[_1.endDateField],_9);if(_4.dragMoveTarget.getVisibleHeight()<_7)return false;if(!_1.eventResized(_9,this.event))return false;_1.updateEvent(this.event,this.event[_1.startDateField],_9,this.event[_1.nameField],this.event[_1.descriptionField],null,true);if(_1.eventAutoArrange){_1.$64n(this.$53i,_2,_3);_4.dragMoveTarget.setPageRect(this.getPageLeft(),this.getPageTop())}
this.$54h=false});isc.B._maxIndex=isc.C+14;isc.ClassFactory.defineClass("TimelineWindow","EventWindow");isc.A=isc.TimelineWindow.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.showFooter=false;isc.A.resizeFrom=["L","R"];isc.A.dragAppearance="none";isc.B.push(isc.A.initWidget=function isc_TimelineWindow_initWidget(){if(this.calendar.showEventWindowHeader==false){this.showBody=false;this.showTitle=false}
this.Super("initWidget",arguments)},isc.A.draw=function isc_TimelineWindow_draw(_1,_2,_3,_4){this.invokeSuper(isc.TimelineWindow,"draw",_1,_2,_3,_4);if(this.calendar.showEventWindowHeader==false){var _5=isc.Canvas.create({autoDraw:false,width:"100%",height:0,top:0,contents:(this.descriptionText?this.descriptionText:" ")});this.addMember(_5);_5.setHeight(0);_5.setTop(0);this.$734=_5}},isc.A.click=function isc_TimelineWindow_click(){var _1=this.calendar;var _2=_1.eventClick(this.event,"timeline");if(_2){if(!_1.canEditEvent(this.event))return;var _3=_1.timelineView.getEventColumn(this.getLeft()+1),_4=_1.timelineView.getTimelineEventRowNum(this.event);_1.$53l(_4,_3,null,this)}},isc.A.checkForOverlap=function isc_TimelineWindow_checkForOverlap(_1,_2,_3,_4){var _5={},_6=this.calendar;_5[_6.startDateField]=_2.duplicate();_5[_6.endDateField]=_3.duplicate();_5[_6.laneNameField]=_4;var _7=_6.timelineView.findOverlappingEvents(_1,_5);if(_7.length==0){return false}else if(_7.length>1){isc.logWarn("overlap detected:"+_7.length);return true}else{var _8=_7[0];var _9=_6.startDateField,_10=_6.endDateField;if((_6.equalDatesOverlap==false?_3>_8[_9]:_3>=_8[_9])&&_2<_8[_9])
{_3=_8[_9].duplicate();_2=_3.duplicate();_2.setMinutes(_2.getMinutes()-this.getEventLength());return[_2,_3]}else if((_6.equalDatesOverlap==false?_2<_8[_10]:_2<=_8[_10])&&_3>_8[_10])
{_2=_8[_10].duplicate();_3=_2.duplicate();_3.setMinutes(_3.getMinutes()+this.getEventLength());return[_2,_3]}else{return true}}},isc.A.destroyLines=function isc_TimelineWindow_destroyLines(){if(this.$645){if(this.$645[0])this.$645[0].destroy();if(this.$645[1])this.$645[1].destroy();if(this.$645[2])this.$645[2].destroy();if(this.$645[3])this.$645[3].destroy()}},isc.A.hideLines=function isc_TimelineWindow_hideLines(){if(this.$645){if(this.$645[0])this.$645[0].hide();if(this.$645[1])this.$645[1].hide();if(this.$645[2])this.$645[2].hide();if(this.$645[3])this.$645[3].hide()}},isc.A.showLines=function isc_TimelineWindow_showLines(){if(this.$645){if(this.$645[0])this.$645[0].show();if(this.$645[1])this.$645[1].show();if(this.$645[2])this.$645[2].show();if(this.$645[3])this.$645[3].show()}},isc.A.hide=function isc_TimelineWindow_hide(){this.invokeSuper(isc.TimelineWindow,"hide");this.hideLines()},isc.A.show=function isc_TimelineWindow_show(){this.invokeSuper(isc.TimelineWindow,"show");this.showLines()},isc.A.parentResized=function isc_TimelineWindow_parentResized(){this.invokeSuper(isc.EventWindow,"parentResized")},isc.A.mouseDown=function isc_TimelineWindow_mouseDown(){this.dragTarget.eventWin=this});isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("TimelineView","ListGrid");isc.TimelineView.changeDefaults("bodyProperties",{childrenSnapToGrid:true,snapToCells:false,suppressVSnapOffset:true});isc.A=isc.TimelineView.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canSort=false;isc.A.canResizeFields=false;isc.A.canAutoFitFields=false;isc.A.canReorderFields=false;isc.A.showHeaderContextMenu=false;isc.A.showAllRecords=true;isc.A.fixedRecordHeights=true;isc.A.alternateRecordStyles=true;isc.A.showRollOver=true;isc.A.useCellRollOvers=true;isc.A.canSelectCells=true;isc.A.laneNameField="lane";isc.A.eventWidth=60;isc.A.eventHeight=60;isc.A.labelColumnWidth=75;isc.A.labelColumnBaseStyle="labelColumn";isc.A.eventPageSize=30;isc.A.trailIconSize=16;isc.A.leadIconSize=16;isc.A.scrollToToday=false;isc.A.lineImage="[SKINIMG]Stretchbar/hsplit_over_stretch.gif";isc.A.trailingEndPointImage="[SKINIMG]actions/prev.png";isc.A.leadingEndPointImage="[SKINIMG]actions/next.png";isc.A.headerSpanHeight=24;isc.A.timelineDragTargetDefaults={_constructor:"Canvas",border:"1px dashed red",width:1,height:1,dragAppearance:"target",dragTarget:this,visibility:"hidden",positionToEventWin:function(_1){var _2=this.eventWin,_3=this.timelineView.getEventLeft(_2.event),_4=_2.getTop(),_5=_2.getVisibleWidth(),_6=_2.getVisibleHeight();this.resizeTo(_5,_6);this.moveTo(_3,_4);if(_1){if(!this.isDrawn())this.draw();this.show();this.bringToFront()}},dragRepositionStart:function(){var _1=this.eventWin,_2=_1.parentElement,_3=_2.getEventRow(),_4=_2.getRowTop(_3),_5=_2.getEventColumn(this.timelineView.getEventLeft(_1.event));_1.$8l=_3;_1.$961=_2.getEventColumn()-_5;_1.$962=_1.getTop()-_4;_1.$644=_5;_1.$936=_3;this.positionToEventWin(true)},dragRepositionMove:function(){var _1=this.eventWin,_2=_1.calendar,_3=_1.parentElement,_4=_3.getEventRow(),_5=_3.getEventColumn()-_1.$961;if(_4!=_1.$936){if(_2.canEditLane==false){_4=_1.$936}else{_1.$936=_4}}
if(_5!=_1.$937){_1.$937=_5}
var _6=this.creator.getRowTop(_4),_7=(_3.getTop()+_6+_1.$962),_8=_3.getColumnLeft(_5);this.moveTo(_8,_7)},dragRepositionStop:function(){var _1=this.eventWin,_2=this.timelineView,_3=_1.calendar,_4=_1.event;_1.parentElement.HSnapOrigin=0;var _5=(_3.canEditLane?_2.getEventRow():_1.$936),_6;if(_5!=_1.$8l){if(_3.canEditLane){var _7=_3.lanes.get(_5);_6=_7.name||_7[_3.laneNameField]}else{_1.showLines();return false}}
if(_6)_4[_3.laneNameField]=_6;var _8=[_4[_3.startDateField].duplicate(),_4[_3.endDateField].duplicate()];if(_4[_3.leadingDateField]&&_4[_3.trailingDateField]){_8.add(_4[_3.leadingDateField].duplicate());_8.add(_4[_3.trailingDateField].duplicate())}
var _9=_1.ns.EH;var _10=_9.dragMoveTarget.getLeft();var _11=_3.timelineView.getDateFromPoint(_10);var _12=_11.duplicate();_12.setMinutes(_12.getMinutes()+_1.getEventLength());_8[0]=_11;_8[1]=_12;var _13=Math.floor((_11.getTime()-_4[_3.startDateField].getTime())/(1000*60));if(_4[_3.leadingDateField])_8[2].setMinutes(_8[2].getMinutes()+_13);if(_4[_3.trailingDateField])_8[3].setMinutes(_8[3].getMinutes()+_13);var _14={}
if(_6)_14[_3.laneNameField]=_6;if(_4[_3.leadingDateField]&&_4[_3.trailingDateField]){_14[_3.leadingDateField]=_8[2];_14[_3.trailingDateField]=_8[3]}
if(_6==null)_6=_4[_3.laneNameField];if(_3.adjustEventTimes){var _15=_3.adjustEventTimes(_4,_1,_8[0],_8[1],_6);if(_15){_8[0]=_15[0].duplicate();_8[1]=_15[1].duplicate()}}
var _16=_1.checkForOverlap(_4,_8[0],_8[1],_6);if(_4.$646&&_4.$646.slotNum>0&&_16!=true){_4.$646.slotNum=null}
if(_3.allowEventOverlap==false){if(_16==true){if(_3.timelineEventOverlap){_3.timelineEventOverlap(false,_4,_1,_8[0],_8[1],_6)}
return false}else if(isc.isAn.Array(_16)){_8[0]=_16[0].duplicate();_8[1]=_16[1].duplicate();if(_3.timelineEventOverlap){_3.timelineEventOverlap(true,_4,_1,_8[0],_8[1],_6)}}}
if(!_3.timelineEventMoved(_4,_1,_8[0],_8[1],_6))return false;this.hide();_3.updateEvent(_4,_8[0],_8[1],_4[_3.nameField],_4[_3.descriptionField],_14,true);return false},dragResizeStart:function(){var _1=this.eventWin,_2=_1.parentElement,_3=_2.getEventRow(),_4=_2.getEventColumn();_1.$8l=_3;_1.$644=_4;this.positionToEventWin(true)},dragResizeStop:function(){var _1=this.eventWin,_2=_1.calendar,_3=_1.event,_4,_5,_6=this.ns.EH,_7,_8=_6.dragMoveTarget.getLeft();if(_8==this.eventWin.getLeft()+1){_4=_3[_2.startDateField].duplicate();var _9=(_8+_6.dragMoveTarget.getVisibleWidth());_5=_2.timelineView.getDateFromPoint(_9)}else{_4=_2.timelineView.getDateFromPoint(_8);_5=_3[_2.endDateField].duplicate()}
if(!_2.timelineEventResized(_3,_1,_4,_5))return false;this.hide();_2.updateEvent(_3,_4,_5,_3[_2.nameField],_3[_2.descriptionField],null,true)}};isc.B.push(isc.A.initWidget=function isc_TimelineView_initWidget(){this.fields=[];var c=this.creator;if(c.laneNameField)this.laneNameField=c.laneNameField;if(c.renderEventsOnDemand)this.renderEventsOnDemand=c.renderEventsOnDemand;if(c[c.startDateField])this.startDate=c[c.startDateField];if(c[c.endDateField])this.endDate=c[c.endDateField];if(c.labelColumnWidth&&c.labelColumnWidth!=this.labelColumnWidth){this.labelColumnWidth=c.labelColumnWidth}
if(c.timelineEventPadding!=null)this.timelineEventPadding=c.timelineEventPadding;if(c.eventDragGap!=null)this.eventDragGap=c.eventDragGap;if(c.headerLevels)this.headerLevels=isc.shallowClone(c.headerLevels);this.$963=this.headerHeight;var _2=c.timelineGranularity,_3=isc.DateUtil.getTimeUnitKey(_2);if(!this.startDate){this.startDate=isc.DateUtil.getAbsoluteDate("-0"+_3,c.chosenDate)}
if(!this.endDate){this.endDate=isc.DateUtil.getAbsoluteDate("+20"+_3,this.startDate)}
this.cellHeight=this.eventHeight;this.fields=this.calcFields();var _4=this.creator.lanes||[];this.setLanes(_4.duplicate());this.$730();this.Super("initWidget");this.addAutoChild("timelineDragTarget")},isc.A.setLanes=function isc_TimelineView_setLanes(_1){this.setData(_1)},isc.A.$730=function isc_TimelineView__scrubDateRange(){var _1=this.creator.timelineGranularity;if(_1=="day"){this.startDate.setHours(0);this.startDate.setMinutes(0);this.startDate.setSeconds(0);this.startDate.setMilliseconds(0)}else if(_1=="hour"){this.startDate.setMinutes(0);this.startDate.setSeconds(0);this.startDate.setMilliseconds(0)}else if(_1=="minute"){this.startDate.setSeconds(0);this.startDate.setMilliseconds(0)}},isc.A.scrollTimelineTo=function isc_TimelineView_scrollTimelineTo(_1){this.bodies[1].scrollTo(_1)},isc.A.setEventHeight=function isc_TimelineView_setEventHeight(_1){this.eventHeight=_1;this.setCellHeight(_1);this.refreshEvents()},isc.A.setEventWidth=function isc_TimelineView_setEventWidth(_1){this.eventWidth=_1;this.setFields(this.calcFields());this.refreshEvents()},isc.A.setTimelineRange=function isc_TimelineView_setTimelineRange(_1,_2,_3,_4){this.startDate=_1.duplicate();this.creator.startDate=_1.duplicate();this.endDate=_2.duplicate();this.creator.endDate=_2.duplicate();if(_3)this.creator.timelineGranularity=_3;if(_4)this.creator.timelineUnitsPerColumn=_4;isc.logWarn('setTimelineRange:'+[_3,_4,this.creator.timelineGranularity,this.creator.timelineUnitsPerColumn]);var _5=this.calcFields();this.setFields(_5);this.$730();this.refreshVisibleEvents()},isc.A.addUnits=function isc_TimelineView_addUnits(_1,_2,_3){_3=_3||this.creator.timelineGranularity;if(_3=="century"){_1.setFullYear(_1.getFullYear()+(_2*100))}else if(_3=="decade"){_1.setFullYear(_1.getFullYear()+(_2*10))}else if(_3=="year"){_1.setFullYear(_1.getFullYear()+_2)}else if(_3=="quarter"){_1.setMonth(_1.getMonth()+(_2*3))}else if(_3=="month"){_1.setMonth(_1.getMonth()+_2)}else if(_3=="week"){_1.setDate(_1.getDate()+(_2*7))}else if(_3=="day"){_1.setDate(_1.getDate()+_2)}else if(_3=="hour"){_1.setHours(_1.getHours()+_2)}else if(_3=="minute"){_1.setMinutes(_1.getMinutes()+_2)}else if(_3=="second"){_1.setSeconds(_1.getSeconds()+_2)}else if(_3=="millisecond"){_1.setMilliseconds(_1.getMilliseconds()+_2)}
return _1},isc.A.getTimelineEventLeft=function isc_TimelineView_getTimelineEventLeft(_1){var _2=this.getTimelineEventColNum(_1);return this.getColumnLeft(_2)},isc.A.getTimelineEventColNum=function isc_TimelineView_getTimelineEventColNum(_1){var _2=this.getFields(),_3=_1[this.creator.startDateField];for(var i=0;i<_2.length;i++){var _5=_2[i];if(_5.date&&_5.date>_3){return i-1}}
return null},isc.A.getTimelineEventTop=function isc_TimelineView_getTimelineEventTop(_1){var _2=this.getTimelineEventRowNum(_1);return this.getRowTop(_2)},isc.A.getTimelineEventRowNum=function isc_TimelineView_getTimelineEventRowNum(_1){var _2=this.data.find("name",_1[this.creator.laneNameField]);if(!_2)_2=this.data.find(this.creator.laneNameField,_1[this.creator.laneNameField]);return this.getRecordIndex(_2)},isc.A.calcFields=function isc_TimelineView_calcFields(){var _1=[],c=this.creator;if(this.creator.laneFields){var _3=this.creator.laneFields;_3.setProperty("frozen",true);_3.setProperty("isLaneField",true);for(var i=0;i<_3.length;i++){if(_3[i].width==null)_3[i].width=this.labelColumnWidth;_1.add(_3[i])}}else{var _5={width:this.labelColumnWidth,name:"title",title:" ",showTitle:false,frozen:true,isLaneField:true}
_1.add(_5)}
if(c.headerLevels){this.headerLevels=isc.shallowClone(c.headerLevels)}
if(this.headerLevels){this.fieldHeaderLevel=this.headerLevels[this.headerLevels.length-1];this.headerLevels.remove(this.fieldHeaderLevel);c.timelineGranularity=this.fieldHeaderLevel.unit}
this.adjustTimelineForHeaders();var _6=this.startDate.duplicate(),_7=this.endDate,_8=c.timelineUnitsPerColumn,_9=0,_10=this.fieldHeaderLevel&&this.fieldHeaderLevel.titles?this.fieldHeaderLevel.titles:[];while(_6.getTime()<=_7.getTime()){var _11={};_11=isc.addProperties(_11,{name:"f"+_9,title:_10[_9]||this.getDayFieldTitle(_6),width:this.eventWidth,date:_6.duplicate()},this.getFieldProperties(_6));_1.add(_11);_6=this.addUnits(_6,_8);_9++}
this.buildHeaderSpans(_1,this.headerLevels,this.startDate,this.endDate);return _1},isc.A.adjustTimelineForHeaders=function isc_TimelineView_adjustTimelineForHeaders(){var _1=this.creator,_2=this.fieldHeaderLevel?this.fieldHeaderLevel.unit:_1.timelineGranularity,_3=_1.startDate,_4=_1.endDate;var _5=isc.DateUtil.getTimeUnitKey(_2);_1.startDate=this.startDate=isc.DateUtil.getStartOf(_3,_5);_1.endDate=this.endDate=isc.DateUtil.getEndOf(_4,_5)},isc.A.buildHeaderSpans=function isc_TimelineView_buildHeaderSpans(_1,_2,_3,_4){var _5=_3.duplicate(),c=this.creator,_7=[];if(_2&&_2.length>0){var _8=this.getHeaderSpans(_3,_4,_2,0,_1);this.headerHeight=this.$963+this.headerSpanHeight}
if(_8&&_8.length>0)this.headerSpans=_8},isc.A.getHeaderSpans=function isc_TimelineView_getHeaderSpans(_1,_2,_3,_4,_5){var _6=_1.duplicate(),c=this.creator,_8=_3[_4],_9=_8.unit,_10=_4>0?_3[_4-1].unit:_9,_11=c.timelineUnitsPerColumn,_12=_8.titles||[],_13=[],_14=0;if(_4>0){if(isc.DateUtil.compareTimeUnits(_9,_10)>0){isc.logWarn("The order of the specified HeaderLevels is incorrect - '"+_9+"' is of a larger granularity than '"+_10+"'")}}
while(_6<=_2){var _15=this.addUnits(_6.duplicate(),_11,_9);var _16={unit:_9,startDate:_6,endDate:_15,fields:[]};var _17;if(_12[_14]){_17=_12[_14]}else{_17=this.getHeaderLevelTitle(_9,_6,_15)}
_16.title=_17;this.setSpanDates(_16,_6);for(var i=0;i<_5.length;i++){var _19=_5[i];if(_19.isLaneField||_19.date<_16.startDate)continue;if(_19.date>=_16.endDate)break;_16.fields.add(_19.name)}
if(_4<_3.length-1){_16.spans=this.getHeaderSpans(_16.startDate,_16.endDate,_3,_4+1,_5);if(_8.titles&&_8.titles.length!=_16.spans.length){isc.logWarn("The titles array provided for the "+_8.unit+" levelHeader has a length mismatch: expected "+_16.spans.length+" but "+_8.titles.length+" are present.  Some titles  may be auto-generated according to TimeUnit.")}}
_13.add(isc.clone(_16));_6=_15.duplicate();_14++}
return _13},isc.A.getHeaderLevelTitle=function isc_TimelineView_getHeaderLevelTitle(_1,_2,_3){var _4;if(_1=="century"||_1=="decade"){_4=_2.getFullYear()+" - "+_3.getFullYear()}else if(_1=="year"){_4=_2.getFullYear()}else if(_1=="quarter"){_4=_2.getShortMonthName()+" - "+_3.getShortMonthName()}else if(_1=="month"){_4=_2.getShortMonthName()}else if(_1=="week"){_4=this.creator.weekPrefix+" "+_2.getWeek()}else if(_1=="day"){_4=_2.getShortDayName()}else{if(_1=="hour")_4=_2.getHours();if(_1=="minute")_4=_2.getMinutes();if(_1=="second")_4=_2.getSeconds();if(_1=="millisecond")_4=_2.getMilliseconds();if(_1=="hour")_4=_2.getHours()}
return _4},isc.A.setSpanDates=function isc_TimelineView_setSpanDates(_1,_2){var _3=isc.DateUtil.getTimeUnitKey(_1.unit);_1.startDate=isc.DateUtil.getStartOf(_2,_3);_1.endDate=isc.DateUtil.getEndOf(_1.startDate,_3)},isc.A.getFieldProperties=function isc_TimelineView_getFieldProperties(_1){return null},isc.A.getDayFieldTitle=function isc_TimelineView_getDayFieldTitle(_1){if(this.creator.timelineGranularity=="day"){return(_1.getMonth()+1)+"/"+_1.getDate()}else{var _2=_1.getMinutes().toString();if(_2.length==1)_2="0"+_2;return _1.getHours()+":"+_2}},isc.A.draw=function isc_TimelineView_draw(_1,_2,_3,_4){this.invokeSuper(isc.TimelineView,"draw",_1,_2,_3,_4);var _5=this.creator.eventSnapGap;if(_5){this.body.snapHGap=Math.round((_5/60)*this.eventWidth)}else{this.body.snapHGap=this.eventWidth}
this.body.snapVGap=this.eventHeight;if(this.scrollToToday!=false){var _6=new Date();_6.setDate(_6.getDate()-this.scrollToToday);var _7=this.creator.getDayDiff(this.startDate,_6);var _8=_7*this.eventWidth;this.bodies[1].scrollTo(_8,0)}
this.logDebug('draw','calendar');this.body.addChild(this.timelineDragTarget);this.timelineDragTarget.timelineView=this;this.refreshEvents()},isc.A.getCellCSSText=function isc_TimelineView_getCellCSSText(_1,_2,_3){var _4=this.startDate.duplicate();_4.setDate(_4.getDate()+_3-this.getLabelColCount());var _5=new Date();if(_4.toShortDate(null,false)==_5.toShortDate(null,false)&&this.creator.todayBackgroundColor){return"background-color:"+this.creator.todayBackgroundColor}else return null},isc.A.formatDateForDisplay=function isc_TimelineView_formatDateForDisplay(_1){return _1.getShortMonthName()+" "+_1.getDate()+", "+_1.getFullYear()},isc.A.getLabelColCount=function isc_TimelineView_getLabelColCount(){if(this.creator.laneFields){return this.creator.laneFields.length}else{return 1}},isc.A.isLabelCol=function isc_TimelineView_isLabelCol(_1){if(_1<this.getLabelColCount())return true;else return false},isc.A.getCellStyle=function isc_TimelineView_getCellStyle(_1,_2,_3){var _4=this.getBaseStyle(_1,_2,_3);if(this.isLabelCol(_3))return _4;else{return _4}},isc.A.getBaseStyle=function isc_TimelineView_getBaseStyle(_1,_2,_3){if(this.isLabelCol(_3))return this.labelColumnBaseStyle;else{return this.baseStyle}},isc.A.nextOrPrev=function isc_TimelineView_nextOrPrev(_1){var _2=_1?this.eventPageSize:0-this.eventPageSize;this.startDate.setDate(this.startDate.getDate()+_2);this.endDate.setDate(this.endDate.getDate()+_2);this.setFields(this.calcFields());if(this.creator.dataSource&&isc.ResultSet&&isc.isA.ResultSet(this.creator.data)){this.creator.data.invalidateCache();this.creator.filterData(this.creator.getNewCriteria())}else{this.creator.dataChanged()}},isc.A.refreshEvents=function isc_TimelineView_refreshEvents(){if(!this.body||!this.creator.hasData())return;var _1=this.startDate,_2=this.endDate,_3=this.creator;var _4=_3.data.getRange(0,_3.data.getLength());this.logDebug('refreshing events','calendar');this.tagDataForOverlap(_4);this.refreshVisibleEvents()},isc.A.getVisibleEvents=function isc_TimelineView_getVisibleEvents(){var _1=this.getVisibleDateRange();var _2=this.getVisibleRowRange();var _3=this.creator;var _4=_3.data;var _5=[];for(var i=0;i<_4.getLength();i++){var _7=_4.get(i);if(!_7){isc.logWarn('getVisibleEvents: potentially invalid index: '+i);break}
var _8=_7[_3.laneNameField];var _9={laneName:_8};if(_7[_3.leadingDateField]&&_7[_3.trailingDateField]){_9[_3.leadingDateField]=_1[0];_9[_3.trailingDateField]=_1[1]}else{_9[_3.startDateField]=_1[0];_9[_3.endDateField]=_1[1]}
var _10=this.data.findIndex("name",_8);if(_10<0)_10=this.data.findIndex(_3.laneNameField,_8);if(this.eventsOverlap(_9,_7,(_3.canEditLane==true))&&_2[0]<=_10&&_10<=_2[1]){_5.add(_7)}}
return _5},isc.A.findOverlappingEvents=function isc_TimelineView_findOverlappingEvents(_1,_2){var _3=this.creator;var _4=_3.data;var _5=[];for(var i=0;i<_4.getLength();i++){var _7=_4.get(i);if(!_7){isc.logWarn('getVisibleEvents: potentially invalid index: '+i);break}
if(_3.eventsAreSame(_7,_1)){continue}
var _8={};if(_7[_3.leadingDateField]&&_7[_3.trailingDateField]){_8[_3.leadingDateField]=_2[_3.leadingDateField];_8[_3.trailingDateField]=_2[_3.trailingDateField]}else{_8[_3.startDateField]=_2[_3.startDateField];_8[_3.endDateField]=_2[_3.endDateField]}
_8.laneName=_7[_3.laneNameField];if(_2[_3.laneNameField]==_7[_3.laneNameField]&&this.eventsOverlap(_8,_7,(_3.canEditLane==true))){_5.add(_7)}}
return _5},isc.A.refreshVisibleEvents=function isc_TimelineView_refreshVisibleEvents(){var _1=this.getVisibleEvents();var _2=_1.getLength();this.logDebug('refreshing visible events','calendar');for(var i=0;i<_2;i++){var _4=_1.get(i);if(_4.$646)_4.$646.visited=false;this.addEvent(_4,i)}
this.clearEvents(_2);var _5=this.creator;if(_5.eventsRendered&&isc.isA.Function(_5.eventsRendered))
_5.eventsRendered()},isc.A.tagDataForOverlap=function isc_TimelineView_tagDataForOverlap(_1,_2){if(_1.getLength()==0)return;var _3=this,_4=this.creator,_5=[],_6=0,_7=0,_8=0,_9=_1.get(0),_10=_9[_4.laneNameField];_1.sort(function(_21,_22){var _11;if(_21[_4.leadingDateField]&&_22[_4.leadingDateField])_11=_4.leadingDateField;else _11=_4.startDateField;if(_21[_4.laneNameField]<_22[_4.laneNameField])return-1;else if(_21[_4.laneNameField]>_22[_4.laneNameField])return 1;else{if(_4.timelineView.secondarySort){return _4.timelineView.secondarySort(_21,_22)}else{if(_21[_11]<_22[_11])return-1;else if(_21[_11]>_22[_11])return 1;else return 0}}});var _12=0,_13=[];if(_2){while(_12<_1.getLength()&&_1.get(_12)[_4.laneNameField]!=_2){_12++}}
for(var i=_12;i<_1.getLength();i++){var _15=_1.get(i);if(_2&&_15[_4.laneNameField]!=_2){break}else if(_2)_13.add(_15);if(_15[_4.laneNameField]!=_10){_6=_7=_8=0;_5=[];_10=_15[_4.laneNameField]}
var _16=true;var _17=[];for(var j=0;j<_5.length;j++){var _19=_5[j];if(this.allEventsOverlap||this.eventsOverlap(_15,_19)){_17.add(_19)}else{_6--;if(_6==0)_7=1;_16=false}}
_5=_17;_5.add(_15);_6++;if(_16&&_5.length>_7){_7++}
for(var j=0;j<_5.length;j++){var _19=_5[j];if(!isc.isAn.Object(_19.$646))_19.$646={};if(_19.$646&&!_19.$646.visited){_19.$646.slotNum=null;var _20=this.nextAvailSlot(_5,_7);if(_20<1){isc.logWarn("Calendar.timelineView.tagDataForOverlap, no slot for event:"+isc.Log.echoFull(_19))}
_19.$646.slotNum=_20;_19.$646.visited=true}
_19.$646.totalSlots=_7}
if(_7>_8)_8++}
return _13},isc.A.nextAvailSlot=function isc_TimelineView_nextAvailSlot(_1,_2){var _3=[];for(var i=0;i<_2;i++){_3.add(false)}
for(var i=0;i<_1.length;i++){var _5=_1[i];if(!_5.$646)continue;if(_5.$646.slotNum)_3[_5.$646.slotNum-1]=true}
var _6=_3.indexOf(false)+1;return _6},isc.A.eventsOverlap=function isc_TimelineView_eventsOverlap(_1,_2,_3){var a=_1,b=_2;if(_3&&a.laneName!=b[this.creator.laneNameField])return false;var _6,_7,_8=this.creator;if(a[_8.leadingDateField]&&b[_8.leadingDateField])_6=_8.leadingDateField;else _6=_8.startDateField;if(a[_8.trailingDateField]&&b[_8.trailingDateField])_7=_8.trailingDateField;else _7=_8.endDateField;var _9=a[_6],_10=a[_7],_11=b[_6],_12=b[_7];if(_8.equalDatesOverlap&&_8.allowEventOverlap){if((_9<_11&&_10>=_11&&_10<=_12)||(_9<=_12&&_10>_12)||(_9<=_11&&_10>=_12)||(_9>=_11&&_10<=_12)){return true}else{return false}}else{if((_9<_11&&_10>_11&&_10<_12)||(_9<_12&&_10>_12)||(_9<=_11&&_10>=_12)||(_9>=_11&&_10<=_12)){return true}else{return false}}},isc.A.compareDates=function isc_TimelineView_compareDates(_1,_2,_3){if(_1.getFullYear()<_2.getFullYear()){return 1}else if(_1.getFullYear()>_2.getFullYear()){return-1}
if(_1.getMonth()<_2.getMonth()){return 1}else if(_1.getMonth()>_2.getMonth()){return-1}
if(_1.getDate()<_2.getDate()){return 1}else if(_1.getDate()>_2.getDate()){return-1}
return 0},isc.A.getDateFromPoint=function isc_TimelineView_getDateFromPoint(_1,_2){var _3=this.startDate.duplicate();var _4=this.eventWidth;var _5=this.$731();var _6=0;_6+=Math.floor(_1/_4)*_5;if(!_2)_6+=((_1%_4)/_4)*_5;_3.setMinutes(_3.getMinutes()+_6);return _3},isc.A.$731=function isc_TimelineView__getMinsInACell(){var _1=this.creator.timelineUnitsPerColumn;var _2=this.creator.timelineGranularity;var _3;var _4=0;if(_2=="day"){var _5=24*60;_3=_1*_5}else if(_2=="hour"){_3=_1*60}else if(_2=="minute"){_3=_1}
return _3},isc.A.$732=function isc_TimelineView__getEventBreadth(_1){var _2=this.$731(),_3=_1.event,_4=this.creator,_5,_6;if(Array.isLoading(_3))return null;if(_3[_4.startDateField].getTime()<this.startDate.getTime()){_5=this.startDate.duplicate()}else{_5=_3[_4.startDateField]}
if(_3[_4.endDateField].getTime()>this.endDate.getTime()){_6=this.endDate.duplicate();_6.setMinutes(_6.getMinutes()+_2)}else{_6=_3[_4.endDateField].duplicate()}
var _7=_1.getEventLength(_5,_6);var _8=this.eventWidth;var _9=0;var _10=Math.floor(_7/_2);if(_4.sizeEventsToGrid){var _11=this.getTimelineEventColNum(_3),_12=this.getField(_11),_13=_12.date?_12.date.getTime()==_3[_4.startDateField].getTime():false,r=_7%_2;if(r!=0||!_13)_10+=1}
_9+=_10*_8;if(_4.sizeEventsToGrid==false){_9+=Math.floor(((_7%_2)/_2)*_8)}
return _9},isc.A.getEventLeft=function isc_TimelineView_getEventLeft(_1){var _2=(_1[this.creator.startDateField].getTime()-this.startDate.getTime())/(1000*60);_2=Math.round(_2);var _3=this.eventWidth;var _4=this.$731();var _5=0;_5+=Math.floor(_2/_4)*_3;if(this.creator.sizeEventsToGrid==false){_5+=Math.round(((_2%_4)/_4)*_3)}
if(_5<0)_5=0;return _5},isc.A.sizeEventWindow=function isc_TimelineView_sizeEventWindow(_1,_2){var _3=this.creator,_4=_1.event,_5=this.eventWidth,_6=this.eventHeight;if(Array.isLoading(_4))return;var _7=_4[_3.eventWindowStyleField]||_3.eventWindowStyle;if(_7){_1.setStyleName(_7);if(_3.showEventDescriptions==false&&_1.header){_1.header.setStyleName(_7)}}
if(_4.eventWindowBackgroundColor){_1.setBackgroundColor(_4.eventWindowBackgroundColor)}else{_1.backgroundColor=null;if(_1.isDrawn()){_1.getStyleHandle().backgroundColor=null}}
_5=this.$732(_1);var _8=this.getEventLeft(_4);_1.setTitle(_3.getEventTitle(_4));if(_2)_1.hide();var _9=this.data.findIndex("name",_4[this.laneNameField]);if(_9<0)_9=this.data.findIndex(this.laneNameField,_4[this.laneNameField]);var _10=_9*_6;if(this.timelineEventPadding>0){_10+=this.timelineEventPadding;_8+=this.timelineEventPadding;_5-=(this.timelineEventPadding*2);_6-=(this.timelineEventPadding*2)}
if(_3.eventsOverlapGridLines){_8-=1;_5+=1;_10-=1;_6+=1}
if(this.eventDragGap>0){_5-=this.eventDragGap}
if(_3.showEventDescriptions!=false){_1.setDescriptionText(_4[_3.descriptionField])}
this.adjustDimensionsForOverlap(_1,_8,_10,_5,_6);if(_2)_1.show();if(_4[_3.leadingDateField]&&_4[_3.trailingDateField]){if(_1.$645)this.addLeadingAndTrailingLines(_1);else this.delayCall("addLeadingAndTrailingLines",[_1])}},isc.A.adjustDimensionsForOverlap=function isc_TimelineView_adjustDimensionsForOverlap(_1,_2,_3,_4,_5){var _6=_1.event.$646;if(_6&&_6.totalSlots>0){_5=Math.floor(_5/_6.totalSlots)-this.timelineEventPadding;_3=_3+Math.floor((_5*(_6.slotNum-1)));if(_6.slotNum>1)_3+=this.timelineEventPadding;if(_6.totalSlots>1&&this.creator.eventsOverlapGridLines)_5+=1}
_1.resizeTo(_4,_5);if(_1.$77n)_1.header.resizeTo(_4,_5);var _7=_1.moveTo(_2,_3)},isc.A.addLeadingAndTrailingLines=function isc_TimelineView_addLeadingAndTrailingLines(_1){var _2,_3,_4,_5;if(_1.$645){_2=_1.$645[0];_3=_1.$645[1];_4=_1.$645[2];_5=_1.$645[3]}else{_2=this.$65r();_3=this.$65s(_1,"lead");_4=this.$65r();_5=this.$65s(_1,"trail")}
var _6=this.$65t(_3,_2);var _7=this.$65t(_5,_4);if(!_1.$645){this.body.addChild(_2);this.body.addChild(_3);this.body.addChild(_4);this.body.addChild(_5);_1.$645=[_2,_3,_4,_5]}},isc.A.$65t=function isc_TimelineView__positionIcon(_1,_2){var _3=this.creator,_4=_1.$65e,_5=_4.event,_6=_1.type,_7=this.eventWidth,_8=_4.getVisibleHeight(),_9=_4.getTop(),_10=_4.getLeft();var _11,_12,_13=true;if(_6=="trail"){if(this.compareDates(_5[_3.trailingDateField],this.endDate)<0){_11=_3.getDayDiff(this.endDate,_5[_3.startDateField]);if(_11<1)_11=1;_12=_11*_7;_13=false}else{_11=_3.getDayDiff(_5[_3.trailingDateField],_5[_3.startDateField]);_12=(_11*_7)-(Math.round(_7/2))}}else{if(this.compareDates(this.startDate,_5[_3.leadingDateField])<0){_11=_3.getDayDiff(this.startDate,_5[_3.startDateField]);if(_11<1)_11=1;_12=_11*_7;_13=false}else{_11=_3.getDayDiff(_5[_3.leadingDateField],_5[_3.startDateField]);_12=(_11*_7)-(Math.round(_7/2))}}
var _14=(_6=="trail"?_10+_7:_10-_12);_2.moveTo(_14,_9+(Math.round(_8/2)));_2.setWidth(_12);var _15=0;if(_5.$646&&_5.$646.slotNum>0){_15=(_5.$646.slotNum-1)*_8}
var _16=(_6=="trail"?this.trailIconSize:this.leadIconSize);var _17;if(_13==false)_17=-50;else if(_6=="trail")_17=_10+_7+_12-Math.round(_16/2);else _17=_10-_12-Math.round(_16/2);_1.moveTo(_17,_9+Math.round(_8/2)-Math.round(_16/2));_1.$647=Math.round(_8/2)-Math.round(_16/2)+_15;_1.$648=Math.round(_7/2)-Math.round(_16/2),_1.$65f=_3.getDayDiff(_5[_3.startDateField],this.startDate);return _13},isc.A.$65s=function isc_TimelineView__makeIcon(_1,_2){var _3=(_2=="trail"?this.trailIconSize:this.leadIconSize);var _4=isc.Img.create({$65e:_1,type:_2,autoDraw:false,_redrawWithParent:false,src:(_2=="trail"?this.trailingEndPointImage:this.leadingEndPointImage),width:_3,height:_3,canDragReposition:(this.creator.canEditEvents==true),dragRepositionStart:function(){this.$8l=this.parentElement.getEventRow();this.$644=this.parentElement.getEventColumn();this.parentElement.VSnapOrigin=this.$647;this.parentElement.HSnapOrigin=this.$648},dragRepositionStop:function(){var _5=this.$65f,_6=this.$644,_7=this.parentElement.getEventColumn(),_8=_7-_6,_9=this.$65e.event,_10=this.$65e.calendar,_11=this.type=="trail"?_7-_5:_5-_7;if(_11<1)return false;var _12={};var _13=this.type=="trail"?_10.trailingDateField:_10.leadingDateField;var _14=_9[_13].duplicate();_14.setDate(_14.getDate()+_8);_12[_13]=_14;_10.updateEvent(_9,_9[_10.startDateField],_9[_10.endDateField],_9[_10.nameField],_9[_10.descriptionField],_12,true);return true}});return _4},isc.A.$65r=function isc_TimelineView__makeLine(){var _1=isc.Canvas.create({autoDraw:false,_redrawWithParent:false,height:2,overflow:"hidden",styleName:"eventLine"});return _1},isc.A.clearEvents=function isc_TimelineView_clearEvents(_1){if(!this.body||!this.body.children||!this.$65u)return;if(!_1)_1=0;for(var i=_1;i<this.$65u.length;i++){this.$65u[i].hide()}},isc.A.addEvent=function isc_TimelineView_addEvent(_1,_2){if(!this.$65u)this.$65u=[];var _3=false,_4=this.creator,_5=_4.canEditEvent(_1),_6=(_4.canDragEvents==true&&_1[_4.canDragEventField]!=false),_7;if(this.renderEventsOnDemand&&this.$65u[_2]){_7=this.$65u[_2];_4.setEventWindowID(_1,_7.ID);_7.event=_1;_7.VSnapOrigin=0;_3=true;_7.canDragReposition=_6&&_5;_7.canDragResize=_4.canResizeTimelineEvents&&_5}else{var _7=this.getNewEventWindow(_1);_7.$643=this;this.$65u.add(_7)}
this.sizeEventWindow(_7,_3);if(this.body&&(!_3||_7.parentElement!=this.body)){this.body.addChild(_7)}
if(!_7.isDrawn())_7.draw();if(_7.body)_7.body.show();_7.show()});isc.evalBoundary;isc.B.push(isc.A.removeEvent=function isc_TimelineView_removeEvent(_1){var _2=this.body.children;for(var i=0;i<_2.length;i++){if(isc.isAn.EventWindow(_2[i])&&_2[i].event===_1){var _4=_2[i];_4.parentElement.removeChild(_4);_4.destroy();return true}}
return false},isc.A.getNewEventWindow=function isc_TimelineView_getNewEventWindow(_1){var _2=_1[this.creator.eventWindowStyleField]||this.creator.eventWindowStyle;var _3,_4,_5=true;if(this.creator.showEventDescriptions==false){_5=false}
var _6=(this.creator.canDragEvents==true&&_1[this.creator.canDragEventField]!=false),_7=this.creator.canEditEvent(_1);var _8={calendar:this.creator,_redrawWithParent:false,styleName:_2,canDragReposition:_6&&_7,canDragResize:this.creator.canResizeTimelineEvents&&_7,edgeMarginSize:10,showCloseButton:false,event:_1,descriptionText:_1[this.creator.descriptionField]||"",showHeader:_5,showBody:_5,dragTarget:this.timelineDragTarget}
if(_1.eventWindowBackgroundColor){_8.backgroundColor=_1.eventWindowBackgroundColor}
var _9=isc.TimelineWindow.create(_8);if(!_5){var _10=isc.Label.create({autoDraw:false,styleName:_2,border:"0px",padding:3,height:"*"});_9.addChild(_10);_9.header=_10;_9.$77n=true}
this.creator.setEventWindowID(_1,_9.ID);return _9},isc.A.updateEventWindow=function isc_TimelineView_updateEventWindow(_1){if(!this.body||!this.body.children)return;var _2=this.creator,_3=_1[_2.laneNameField];var _4=this.tagDataForOverlap(_2.data.getRange(0,_2.data.getLength()),_3);if(this.renderEventsOnDemand){this.refreshVisibleEvents()}else{for(var i=0;i<_4.length;i++){var _1=_4.get(i),_6=_2.getEventWindowID(_1),_7=window[_6];if(_1.$646)_1.$646.visited=false;_7.event=_1;this.sizeEventWindow(_7)}}},isc.A.areSame=function isc_TimelineView_areSame(_1,_2){var _3=this.creator;if(_3.dataSource){var _4=_3.$53s,_5=true;for(var _6 in _4){if(_1[_6]!=_2[_6]){_5=false;break}}
return _5}else{return(_1===_2)}},isc.A.resized=function isc_TimelineView_resized(){this.Super('resized',arguments);if(this.isDrawn()&&this.creator.hasData()&&this.renderEventsOnDemand){this.refreshVisibleEvents()}},isc.A.scrolled=function isc_TimelineView_scrolled(){if(this.renderEventsOnDemand){if(this.$57s)isc.Timer.clear(this.$57s);this.$57s=isc.Timer.setTimeout(this.ID+".refreshVisibleEvents()")}},isc.A.getVisibleDateRange=function isc_TimelineView_getVisibleDateRange(){if(!this.renderEventsOnDemand){return[this.startDate.duplicate(),this.endDate.duplicate()]}
var _1=this.body.getScrollLeft();var _2=_1+this.body.getVisibleWidth();var _3=this.getDateFromPoint(_1,true);var _4=this.getDateFromPoint(_2);return[_3,_4]},isc.A.getVisibleRowRange=function isc_TimelineView_getVisibleRowRange(){if(!this.renderEventsOnDemand){return[0,this.data.getLength()]}
var _1=this.bodies[1].getScrollTop();var _2=this.eventHeight;var _3=this.bodies[1].getVisibleHeight();var _4=Math.floor(_1/_2);var _5=Math.floor((_1+_3)/_2);return[_4,_5]});isc.B._maxIndex=isc.C+56;isc.Calendar.registerStringMethods({getDayBodyHTML:"date,events,calendar,rowNum,colNum",getDayHeaderHTML:"date,events,calendar,rowNum,colNum",dayBodyClick:"date,events,calendar,rowNum,colNum",dayHeaderClick:"date,events,calendar,rowNum,colNum",eventClick:"event,viewName",eventChanged:"event",eventMoved:"newDate,event",eventResized:"newDate,event",backgroundClick:"startDate,endDate",backgroundMouseUp:"startDate"});isc.A=isc.DaySchedule;isc.A.$53o=[{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""},{label:"",day1:"",day2:"",day3:"",day4:"",day5:"",day6:"",day7:""}];isc.AutoTest.customizeCalendar();isc.ClassFactory.defineClass("Timeline","Calendar");isc.A=isc.Timeline.getPrototype();isc.A.showTimelineView=true;isc.A.showDayView=false;isc.A.showWeekView=false;isc.A.showMonthView=false;isc.A.showControlBar=false;isc.A.labelColumnWidth=75;isc._moduleEnd=isc._Calendar_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('Calendar module init time: '+(isc._moduleEnd-isc._moduleStart)+'ms','loadTime');delete isc.definingFramework;}else{if(window.isc&&isc.Log&&isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'Calendar'.");}
/*
 * Isomorphic SmartClient
 * Version v8.3_2012-11-20 (2012-11-20)
 * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
 * "SmartClient" is a trademark of Isomorphic Software, Inc.
 *
 * licensing@smartclient.com
 *
 * http://smartclient.com/license
 */
