");return this.content.append(s),t=parseInt(s.css(f?"margin-right":"margin-left"),10),s.remove(),t},_calculateTaskBorderWidth:function(){var t,s,n=B.styles.task+" "+B.styles.taskSingle,i=e("
");return this.content.append(i),s=kendo.getComputedStyles(i[0],["border-left-width"]),t=parseFloat(s["border-left-width"],10),i.remove(),t},_renderTask:function(e,t){var s,n,i,a=this.options.editable,r=t.left,d=B.styles,l=d.taskWrap,h=this.options.calculatedSize,p={},c={className:l,style:{left:r+"px"}};return h&&(c.style.height=h.cell+"px"),e.summary?n=this._renderSummary(e,t):e.isMilestone()?(n=this._renderMilestone(e,t),c.className+=" "+d.taskMilestoneWrap):n=this._renderSingleTask(e,t),s=o("div",c,[n]),a&&a.dependencyCreate!==!1&&(s.children.push(o("div",{className:d.taskDot+" "+d.taskDotStart})),s.children.push(o("div",{className:d.taskDot+" "+d.taskDotEnd}))),e.summary||e.isMilestone()||!a||a.dragPercentComplete===!1||a.update===!1||null!==this._taskTemplate||(i=Math.round(t.width*e.percentComplete),p[f?"right":"left"]=i+"px",s.children.push(o("div",{className:d.taskDragHandle,style:p}))),s},_renderSingleTask:function(e,t){var s,n,i,a=B.styles,r=Math.round(t.width*e.percentComplete),h=[],p=this.options.editable;return null!==this._taskTemplate?s=l(this._taskTemplate(e)):(s=d(e.title),h.push(o("div",{className:a.taskComplete,style:{width:r+"px"}}))),n=o("div",{className:a.taskContent},[o("div",{className:a.taskTemplate},[s])]),h.push(n),p&&(p.destroy!==!1&&n.children.push(o("span",{className:a.taskActions},[o("a",{className:a.link+" "+a.taskDelete,href:"#","aria-label":"Delete"},[o("span",{className:a.icon+" "+a.iconDelete})])])),p.resize!==!1&&p.update!==!1&&(n.children.push(o("span",{className:a.taskResizeHandle+" "+a.taskResizeHandleWest})),n.children.push(o("span",{className:a.taskResizeHandle+" "+a.taskResizeHandleEast})))),i=o("div",{className:a.task+" "+a.taskSingle,"data-uid":e.uid,style:{width:Math.max(t.width-2*t.borderWidth,0)+"px"}},h)},_renderMilestone:function(e){var t=B.styles,s=o("div",{className:t.task+" "+t.taskMilestone,"data-uid":e.uid});return s},_renderSummary:function(e,t){var s=B.styles,n=Math.round(t.width*e.percentComplete),i=o("div",{className:s.task+" "+s.taskSummary,"data-uid":e.uid,style:{width:t.width+"px"}},[o("div",{className:s.taskSummaryProgress,style:{width:n+"px"}},[o("div",{className:s.taskSummaryComplete,style:{width:t.width+"px"}})])]);return i},_renderResources:function(e,t){var s,n,i,a=[];for(n=0,i=e.length;n
0!==s&&(d=Math.abs(n)+k),s?(r-=d,d-=c,_()):(_(),r+=d-p),fc&&(o=u-(p-k)),o-=g),y(),a+=o-k,u<=c&&(d=s?Math.abs(m-f)-h:h,md&&(o=d-l),f&&(o+=c),this._resizeTooltip=e(N({styles:B.styles,start:t,end:s,messages:p.views,format:h.resizeTooltipFormat})).css({top:this._resizeTooltipTop,left:o,"min-width":l}).appendTo(this.content)},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=null,this._resizeTooltip.remove(),this._resizeTooltip=null},_updatePercentCompleteTooltip:function(t,s,n){var i,a,r,o;this._removePercentCompleteTooltip(),i=this._percentCompleteResizeTooltip=e(R({styles:B.styles,text:n})).appendTo(this.element),a=Math.round(p(i)/2),r=i.find(M+B.styles.callout),o=Math.round(p(r)/2),i.css({top:t-(c(i)+o),left:s-a}),r.css("left",a-o)},_removePercentCompleteTooltip:function(){this._percentCompleteResizeTooltip&&this._percentCompleteResizeTooltip.remove(),this._percentCompleteResizeTooltip=null},_updateDependencyDragHint:function(e,t,s){this._removeDependencyDragHint(),s?this._creteVmlDependencyDragHint(e,t):this._creteDependencyDragHint(e,t)},_creteDependencyDragHint:function(t,s){var n=B.styles,i=s.x-t.x,a=s.y-t.y,r=Math.sqrt(i*i+a*a),o=Math.atan(a/i);i<0&&(o+=Math.PI),e("").css({top:t.y,left:t.x,width:r,"transform-origin":"0% 0","-ms-transform-origin":"0% 0","-webkit-transform-origin":"0% 0",transform:"rotate("+o+"rad)","-ms-transform":"rotate("+o+"rad)","-webkit-transform":"rotate("+o+"rad)"}).appendTo(this.content)},_creteVmlDependencyDragHint:function(t,s){var n=e("").appendTo(this.content);n[0].outerHTML=n[0].outerHTML},_removeDependencyDragHint:function(){this.content.find(M+B.styles.dependencyHint).remove()},_createTaskTooltip:function(t,s,n){var i,a=B.styles,r=this.options,o=this.content,d=o.offset(),l=o.width(),h=kendo.scrollLeft(o),u=e(s).parents("tr").first(),k=u.offset(),g=r.tooltip&&r.tooltip.template?kendo.template(r.tooltip.template):V,m=f?n-(d.left+h+kendo.support.scrollbar()):n-(d.left-h),_=k.top+c(u)-d.top+o.scrollTop(),y=this._taskTooltip=e('');y.css({left:m,top:_}).appendTo(o).find(M+a.taskContent).append(g({styles:a,task:t,messages:r.messages.views})),c(y)l&&(m-=i,mc&&d.scrollTop(d.scrollTop()+(o+f-c)),tk&&ng&&sg&&s>k&&t>u||t=s&&e=o&&it&&(s=t),n=this._days(e,s),i=n.length,i>0&&a.push({start:n[0].start,end:n[i-1].end,span:i}),e=s;return a},_months:function(e,t){var s,n,i,a,r=[];for(e=new Date(e),t=new Date(t);e0&&r.push({start:i[0].start,end:i[a-1].end,span:a}),e=s;return r},_years:function(e,t){var s,n,i,a=[];for(e=new Date(e),t=new Date(t);e=t&&(s=t),i=s.getMonth()||12,n=i-e.getMonth(),a.push({start:e,end:s,span:n}),e=s;return a},_slotHeaders:function(e,t){var s,n,i,a=[];for(n=0,i=e.length;n"),a=B.styles,r=e(M+a.tasksWrapper),o=e(M+a.tasksTable);this.content&&this._timeSlots().length&&(this.content.find(".k-current-time").remove(),t=this._timeSlots()[this._slotIndex("start",s)],s