/** * Kendo UI v2016.1.112 (http://www.telerik.com/kendo-ui) * Copyright 2016 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,define){define("kendo.gantt.timeline.min",["kendo.dom.min","kendo.touch.min","kendo.draganddrop.min"],e)}(function(){return function(e){function t(e){return delete e.name,delete e.prefix,delete e.views,e}function s(e){var t=[],s=e.workWeekStart;for(t.push(s);e.workWeekEnd!=s;)s>6?s-=7:s++,t.push(s);return t}function i(){var t=kendo._activeElement();t&&"body"!==t.nodeName.toLowerCase()&&e(t).blur()}var n,a,r=kendo.ui.Widget,o=kendo.dom.element,l=kendo.dom.text,d=kendo.dom.html,h=e.isPlainObject,p=e.extend,c=e.proxy,u=kendo.support.browser,k=!1,g=kendo.keys,f=kendo.data.Query,m="string",_=".kendoGanttTimeline",v="click",y="dblclick",w="mousemove",T="mouseenter",D="mouseleave",b="keydown",H=".",W=kendo.template("#=kendo.toString(start, 't')#"),x=kendo.template("#=kendo.toString(start, 'ddd M/dd')#"),z=kendo.template("#=kendo.toString(start, 'ddd M/dd')# - #=kendo.toString(kendo.date.addDays(end, -1), 'ddd M/dd')#"),S=kendo.template("#=kendo.toString(start, 'MMM')#"),M=kendo.template("#=kendo.toString(start, 'yyyy')#"),C=kendo.template('
'),P=kendo.template('
#=messages.start#: #=kendo.toString(start, format)#
#=messages.end#: #=kendo.toString(end, format)#
'),I=kendo.template('
#=text#%
'),N=kendo.template('
#=task.title#
#=kendo.toString(task.percentComplete, "p0")#
'),R="
 
",V={day:{type:"kendo.ui.GanttDayView"},week:{type:"kendo.ui.GanttWeekView"},month:{type:"kendo.ui.GanttMonthView"},year:{type:"kendo.ui.GanttYearView"}},F={alt:"k-alt",reset:"k-reset",nonWorking:"k-nonwork-hour",header:"k-header",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",tasksWrapper:"k-gantt-tables",rowsTable:"k-gantt-rows",columnsTable:"k-gantt-columns",tasksTable:"k-gantt-tasks",dependenciesWrapper:"k-gantt-dependencies",resource:"k-resource",resourceAlt:"k-resource k-alt",task:"k-task",taskSingle:"k-task-single",taskMilestone:"k-task-milestone",taskSummary:"k-task-summary",taskWrap:"k-task-wrap",taskMilestoneWrap:"k-milestone-wrap",resourcesWrap:"k-resources-wrap",taskDot:"k-task-dot",taskDotStart:"k-task-start",taskDotEnd:"k-task-end",taskDragHandle:"k-task-draghandle",taskContent:"k-task-content",taskTemplate:"k-task-template",taskActions:"k-task-actions",taskDelete:"k-task-delete",taskComplete:"k-task-complete",taskDetails:"k-task-details",taskDetailsPercent:"k-task-pct",link:"k-link",icon:"k-icon",iconDelete:"k-si-close",taskResizeHandle:"k-resize-handle",taskResizeHandleWest:"k-resize-w",taskResizeHandleEast:"k-resize-e",taskSummaryProgress:"k-task-summary-progress",taskSummaryComplete:"k-task-summary-complete",line:"k-line",lineHorizontal:"k-line-h",lineVertical:"k-line-v",arrowWest:"k-arrow-w",arrowEast:"k-arrow-e",dragHint:"k-drag-hint",dependencyHint:"k-dependency-hint",tooltipWrapper:"k-widget k-tooltip k-popup k-group k-reset",tooltipContent:"k-tooltip-content",tooltipCallout:"k-callout k-callout-s",callout:"k-callout",marquee:"k-marquee k-gantt-marquee",marqueeColor:"k-marquee-color"},E=kendo.ui.GanttView=r.extend({init:function(e,t){r.fn.init.call(this,e,t),this.title=this.options.title||this.options.name,this.header=this.element.find(H+E.styles.gridHeader),this.content=this.element.find(H+E.styles.gridContent),this.contentWidth=this.content.width(),this._workDays=s(this.options),this._headerTree=t.headerTree,this._taskTree=t.taskTree,this._taskTemplate=t.taskTemplate?kendo.template(t.taskTemplate,p({},kendo.Template,t.templateSettings)):null,this._dependencyTree=t.dependencyTree,this._taskCoordinates={},this._currentTime()},destroy:function(){r.fn.destroy.call(this),clearTimeout(this._tooltipTimeout),this.headerRow=null,this.header=null,this.content=null,this._dragHint=null,this._resizeHint=null,this._resizeTooltip=null,this._taskTooltip=null,this._percentCompleteResizeTooltip=null,this._headerTree=null,this._taskTree=null,this._dependencyTree=null},options:{showWorkHours:!1,showWorkDays:!1,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,hourSpan:1,slotSize:100,currentTimeMarker:{updateInterval:1e4}},renderLayout:function(){this._slots=this._createSlots(),this._tableWidth=this._calculateTableWidth(),this.createLayout(this._layout()),this._slotDimensions(),this._adjustHeight(),this.content.find(H+E.styles.dependenciesWrapper).width(this._tableWidth)},_adjustHeight:function(){this.content.height(this.element.height()-this.header.outerHeight())},createLayout:function(e){var t=this._headers(e),s=this._colgroup(),i=this._headerTree,n=o("thead",null,t),a=o("table",{style:{width:this._tableWidth+"px"}},[s,n]);i.render([a]),this.headerRow=this.header.find("table:first tr").last()},_slotDimensions:function(){var e,t,s,i,n=this.headerRow[0].children,a=this._timeSlots();for(s=0,i=n.length;i>s;s++)t=n[s],e=a[s],e.offsetLeft=t.offsetLeft,e.offsetWidth=t.offsetWidth},render:function(e){var t,s,i=e.length,n=E.styles,a=this._rowsTable(i),r=this._columnsTable(i),o=this._tasksTable(e),l=this.options.currentTimeMarker,d=this.options.calculatedSize;this._taskTree.render([a,r,o]),t=this.content.find(H+n.rowsTable),d&&(s=d.row*e.length,this.content.find(H+n.tasksTable).height(s),t.height(s)),this._contentHeight=t.height(),this._rowHeight=d?d.row:this._contentHeight/t.find("tr").length,this.content.find(H+n.columnsTable).height(this._contentHeight),l!==!1&&void 0!==l.updateInterval&&this._renderCurrentTime()},_rowsTable:function(e){var t,s,i=[],n=E.styles,a=[null,{className:n.alt}];for(s=0;e>s;s++)t=o("tr",a[s%2],[o("td",null,[l(" ")])]),i.push(t);return this._createTable(1,i,{className:n.rowsTable})},_columnsTable:function(){var e,t,s,i,n,a=[],r=E.styles,d=this._timeSlots(),h=d.length,p=0;for(n=0;h>n;n++)t=d[n],i={},s=t.span,p+=s,1!==s&&(i.colspan=s),t.isNonWorking&&(i.className=r.nonWorking),a.push(o("td",i,[l(" ")]));return e=o("tr",null,a),this._createTable(p,[e],{className:r.columnsTable})},_tasksTable:function(e){var t,s,i,n,a,r,l,d,h=[],p=E.styles,c=this._taskCoordinates={},u=this._calculateMilestoneWidth(),g=Math.round(u.width),f=this.options.resourcesField,m=[p.resource,p.resourceAlt],_=this.options.calculatedSize,v=this._calculateResourcesMargin(),y=this._calculateTaskBorderWidth(),w=function(e){var t=i.left,s=t+i.width;n.isMilestone()&&(t-=g/2,s=t+g),c[n.id]={start:t,end:s,rowIndex:e}};for(l=0,d=e.length;d>l;l++)n=e[l],i=this._taskPosition(n),i.borderWidth=y,t=o("tr",null),s=o("td",null,[this._renderTask(e[l],i)]),n[f]&&n[f].length&&(a=k?this._tableWidth-i.left:Math.max(i.width||u.clientWidth,0)+i.left,r={width:this._tableWidth-(a+v)+"px"},r[k?"right":"left"]=a+"px",_&&(r.height=_.cell+"px"),s.children.push(o("div",{className:p.resourcesWrap,style:r},this._renderResources(n[f],m[l%2])))),t.children.push(s),h.push(t),w(l);return this._createTable(1,h,{className:E.styles.tasksTable})},_createTable:function(e,t,s){var i,n,a,r=[];for(a=0;e>a;a++)r.push(o("col"));return i=o("colgroup",null,r),n=o("tbody",null,t),s.style||(s.style={}),s.style.width=this._tableWidth+"px",o("table",s,[i,n])},_calculateTableWidth:function(){var e,t,s,i,n=this._timeSlots(),a=0,r=0;for(s=0,i=n.length;i>s;s++)e=n[s].span,r+=e,e>a&&(a=e);return t=Math.round(r*this.options.slotSize/a)},_calculateMilestoneWidth:function(){var t,s,i=E.styles.task+" "+E.styles.taskMilestone,n=e("